您好,欢迎访问一九零五行业门户网

javascript中onclick(this)用法介绍_javascript技巧

this指触发事件的对象
复制代码 代码如下:
复制代码 代码如下:
function test(obj){
alert(obj); //[object htmlinputelement]
alert(obj.id); //myinput
alert(obj.value); //javascript中onclick中的this
}
其它类似信息

推荐信息