郁闷的javascript问题,请帮助,能否不使用onload()? 给你个例子:window.attachEvent("onload",function(e){x(1);});window.attachEvent("onload",function(e){x(2);}); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ie script 加个属性 defer="defer"<div id=show>1</div><form id=form1><input type=hidden name=input1 value=1></form><a href=# onclick="x(1)">1</a><a href=# onclick="x(2)">2</a><a href=# onclick="x(3)">3</a><input type=submit value="show input1" onclick='alert(document.getElementById("form1").input1.value);return false'><script defer="defer">function x(val){document.getElementById("form1").input1.value=val;document.getElementById("show").innerHTML="some informatin about "+val;}x(document.getElementById('form1').input1.value);</script><a href="." >click</a> 谢谢两位,查了一下,defer不是那么保险,还是用attachEvent好点。 jsp页面加载后再刷新1次。。。 js 与as3.0之间怎么传递参数 html中选择框下拉列表收起来的事件是什么 Windows Mobile IE 脚本包含问题 关闭所有窗口 js正则高手进,验证一段文本,求高效率的正则写法 正则表达式问题 在线等候~~ 有哪位朋友能提供一下哪里可以下载到JS函数的参考,最好是中文的 怎样才能使层听我的话,在我想要的地方出现 如何实现flash在王页上的透明效果? iframe(frame)能否实时读取网址? localhost 和 ip地址访问页面的问题
<form id=form1><input type=hidden name=input1 value=1></form>
<a href=# onclick="x(1)">1</a>
<a href=# onclick="x(2)">2</a>
<a href=# onclick="x(3)">3</a>
<input type=submit value="show input1" onclick='alert(document.getElementById("form1").input1.value);return false'>
<script defer="defer">
function x(val){
document.getElementById("form1").input1.value=val;
document.getElementById("show").innerHTML="some informatin about "+val;
}
x(document.getElementById('form1').input1.value);
</script><a href="." >click</a>