imagebutton 引发js 事件之奇怪问题!总共70分
http://community.csdn.net/Expert/topic/5749/5749298.xml?temp=.6885645具体内容上面有,我是很奇怪为什么有时候用imageButton引发事件的时候会发生失效的问题!请高手解答其中的原因!明白就结贴~
[解决办法]
1、首先将 <asp:ImageButton ID= "SearchIbtn " runat= "server " ImageUrl= "~/Images/view.gif " OnClientClick= "return showmodule(); "/>
改为:
<input type= "image " id= "SearchIbtn " src= "= "~/Images/view.gif " onclick= "return showmodule(); " />
2、然后加入这句return false;
function showmodule()
{
var Person_ID= window.showModalDialog( "DrugReceivePerson.aspx ", 'popupWindow ', "dialogWidth:450px;dialogHeight:490px; ");
if(Person_ID!=null &&Person_ID!= " " )
{
document.getElementById( 'HFPerson_ID ').value=Person_ID;
document.getElementById( "BindBtn ").click();
return false;//加入这句
}
else
{
}
}