【转】javascript里声明事件处理的几种方式
先声明
<input id=oMessage type=text size=40 value="Hello World!" >第一种
<script language="JavaScript" for="window" event="onload">
alert(oMessage.value);
</script>第二种
<script language="JavaScript">
window.onload=function(){alert(oMessage.value);}
</script>
<body onload="alert(oMessage.value)">本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利
This posting is provided "AS IS" with no warranties, and confers no rights.
This posting is provided "AS IS" with no warranties, and confers no rights.
浙公网安备 33010602011771号