当前位置: 代码迷 >> JavaScript >> 怎么取onClick的值
  详细解决方案

怎么取onClick的值

热度:549   发布时间:2012-02-03 22:02:47.0
如何取onClick的值!
<input   id= "1441 "   onClick= "aaabbbccc "   type= "button "   value= "ONCLICK ">
<input   onClick= "alert(document.all( '1441 ').onClick); "   type= "button "   value= "我想取 'ONCLICK '的ONCLICK内容 ">

------解决方案--------------------
可以改,LZ 想怎么改?说得清楚些!

譬如,L@_@K!

<input id= "1441 " onclick= "alert( '我取! '); " type= "button " value= "ONCLICK ">
<input id= "5151 " onclick= "alert(document.all( '1441 ').onclick); " type= "button " value= "我想取 'ONCLICK '的ONCLICK内容 ">
<script type= "text/javascript ">
<!--
document.all( '5151 ').onclick = function() {
var f0 = document.all( '1441 ').onclick;
document.all( '1441 ').onclick = function() {
f0();
alert( '我再取! ');
};
};
//-->
</script>
  相关解决方案