关于事件触发的问题
javascript吧
全部回复
仅看楼主
level 1
wuxiafe
楼主
for(var i=0; i<5; i++) {
frm.button[i].onclick = function() {
请问里面怎么取到外面循环i的值
}
}
2012年01月20日 03点01分
1
level 13
zgh26782000
藏在属性里,还有这样是绑定不了5个的事件的吧
2012年01月20日 05点01分
2
level 9
708616
frm.button[i]。。。。
这种写法究竟要表达什么。。
2012年01月20日 06点01分
3
level 12
key_fighter09
如果想绑定茫茫多的事件一般是怎样写的?不用jquery的话
2012年01月20日 06点01分
4
level 8
zhenkuu
直接闭包传进去
2012年01月20日 11点01分
5
level 5
91tui
遇到高手了,这个代码我竟然看不懂!在脑子里面运行不了
!
2012年01月20日 11点01分
6
level 11
9菜牜馬矿
请安装最新版浏览器...
2012年01月20日 12点01分
7
level 9
1950195
....function(i){}
2012年01月20日 22点01分
8
level 9
1950195
also U can:
frm.buttons[¡].index = i;
frm.buttons[¡].function() {
alert(this.index);
}
now fixed ceiling code:
frm.buttons[¡].function(i) {
alert(i);
}
2012年01月20日 22点01分
9
level 10
荧光小草
试试才知道…
2012年01月21日 01点01分
10
1