[英]mouse down event is not firing in IE browser
I am trying to create an anchor with a mousedown event. 我正在尝试使用mousedown事件创建一个锚点。
My Code 我的守则
for (i = 0; i < userDetails.length; i++) {
var userProfileURL = "http://www.xyz.com/KLMS/UserProfile.aspx?userid=" + userDetails[i][1];
userTable += "<li><a href=\"" + userProfileURL + "\" onmousedown=\"StoreClickedURL(" + userId + ",'" + encodeURI(userInput) + "','" + encodeURI(userDetails[i][3]) + "')\" title='" + userDetails[i][2] + "'>" + userDetails[i][2] + "</a></li>";
}
By using FireBug I inspect the anchor it is showing like this 通过使用FireBug,我检查它显示的锚点
<a href="http://www.xyz.com/PublicProfile.aspx?id=1088" onmousedown="StoreClickedURL(1,'physics','http://www.xyz.com/PublicProfile.aspx?id=1088')">http://www.xyz.com/PublicProfile.aspx?id=1088</a>
It is working in all browser except IE. 它在IE以外的所有浏览器中工作。 In IE also it is showing the same style anchor what I have mentioned above.
在IE中它也显示了我上面提到的相同的样式锚。
but not going to the function declared in the mousedown event. 但不会去mousedown事件中声明的函数。
Please help 请帮忙
thanks in advance. 提前致谢。
尝试这个
< a href="javascript:StoreClickedURL(1,'physics','xyz.com/PublicProfile.aspx?id=1088');window.location = 'xyz.com/PublicProfile.aspx?id=1088'">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.