Javascript 如何使用ahref链接引用其他页面id?
我有一个页面,用于引用另一个页面div id并触发编辑特定div表单字段的click事件 个人资料页Javascript 如何使用ahref链接引用其他页面id?,javascript,php,jquery,mysql,codeigniter,Javascript,Php,Jquery,Mysql,Codeigniter,我有一个页面,用于引用另一个页面div id并触发编辑特定div表单字段的click事件 个人资料页 <a href="<?php echo base_url('settings_pro/edit'); ?>" name="pull-right" class="edits editabil" id="showEdit">EDIT PROFILE</a> 我正在使用codeigniter将其重定向到错误页面。如何在codeigniter中实现它创建一个带有如下
<a href="<?php echo base_url('settings_pro/edit'); ?>" name="pull-right" class="edits editabil" id="showEdit">EDIT PROFILE</a>
我正在使用codeigniter将其重定向到错误页面。如何在codeigniter中实现它创建一个带有如下哈希标记的链接 在jquery中,获取通过url返回的哈希标记值,并根据需要执行该操作
$(document).ready(function(){
var hash = url.substring(url.indexOf('#')+1); // get the hash tag value
if(hash == "edit"){
//do whatever you needs
$("#edit").trigger("click");
}
});
var url=window.location.href代码>您想用“设置\u pro/edit”做什么
$(document).ready(function(){
if(settings_pro/edit){
$("#edit").trigger("click");
}
});
$(document).ready(function(){
var hash = url.substring(url.indexOf('#')+1); // get the hash tag value
if(hash == "edit"){
//do whatever you needs
$("#edit").trigger("click");
}
});