[已解决问题]
解决于 2008-03-21 09:12
<P> <script type="text/javascript"><BR> function dblclick()<BR> {<BR> var textbox = document.createElement("text");<BR> textbox.value = obj.innerTEXT;<BR> textbox.id = obj.id + 1;<BR> $(obj).after(textbox);<BR> $(obj).hide();<BR> }<BR> <BR> $(document).ready(function()<BR> {<BR> var as = $("#tdtree").find("a[href *= '_doPostBack']");</P>
<P> as.each(function (q){<BR> <BR> if(as[q].ondblclick == null)<BR> {<BR> alert(1);<BR> $(as[q]).bind("ondblclick",dblclick);<BR> }<BR> });<BR> }<BR> );<BR> </script></P>
<P>请问,我这样写为什么绑定不了事件,查看了很多例子都可以,我用as[q].ondblclick = dblclick 这样可以,另外请问我如何穿参数</P>
仁面寿星
|
菜鸟二级
|
园豆:
325
提问于:2008-03-20 17:32