MouseDown在IE中不起作用 [英] MouseDown is not working in IE

查看:169
本文介绍了MouseDown在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我的代码

Hi all
My Code

var dataTable = "<ol>";
$.each(data.response.docs, function (key, value) {
                            dataTable += '<li ><a href="' + value.id + '"  önmousedown=javascript:StoreClickedURL(' + userId + ',"' + encodeURI(userInput) + '","' + value.id + '")>' + value.id + '</a></li>';
                        });
 dataTable += "</ol>";


我正在动态创建锚点.这里的down事件在除IE之外的所有浏览器中都能正常工作.

我在Google中进行了搜索,但没有找到合适的解决方案.

请帮帮我.

在此先感谢


I am dynamically creating anchors.Here house down event is working fine in all browser except IE.

I searched in Google but not found any appropriate solution for this.

Please help me.

Thanks in advance

推荐答案

.each(data.response.docs, function (key,value){ dataTable + = ' < li>< a href =' + value.id + ' önmousedown= javascript:StoreClickedURL(' + userId + ,' + ' ,"' + value.id + ' + value.id + ' </a>< /li>'; }); dataTable + = " ;
.each(data.response.docs, function (key, value) { dataTable += '<li ><a href="' + value.id + '" önmousedown=javascript:StoreClickedURL(' + userId + ',"' + encodeURI(userInput) + '","' + value.id + '")>' + value.id + '</a></li>'; }); dataTable += "</ol>";


我正在动态创建锚点.这里的down事件在除IE之外的所有浏览器中都能正常工作.

我在Google中进行了搜索,但没有找到合适的解决方案.

请帮帮我.

预先感谢


I am dynamically creating anchors.Here house down event is working fine in all browser except IE.

I searched in Google but not found any appropriate solution for this.

Please help me.

Thanks in advance


您的方向错误-请参阅我对问题的评论.

这是一种jQuery的服务模式:
You are going in wrong direction — please see my comment to the question.

This is a jQuery pattern of doing things:


(文档).ready(函数(){ someElement =
(document).ready(function(){ someElement =


这篇关于MouseDown在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆