在html中javascript失效,怎么回事?
这是我的代码<scripttype="text/javascript"language="JavaScript">functionsayhi(na1,na2){vari=...
这是我的代码
<script type="text/javascript" language="JavaScript">
function sayhi( na1,na2)
{
var i=25;
switch (true)
{
case i< 0:
alert("0");
break;
case i>0 && i<10:
alert("1-10");
break;
case i>10 && i<20:
alert("10-20");
break;
default:
alert("more than 20" +" "+arguments[0]+" "+arguments[1]+" "+arguments.length+" "+alert(colors[0]));
}
}
</script>
…………………………
<div>
<p>欢迎来到登录界面!</p>
<form action="#" method="post">
<input type="button" onclick="sayhi('jinbao','yy');" value="登录">
</form>
</div>
<div>
<form action="#" method="post" class="form">
<!-- <input type="text" id="username" name="username">-->
<input type="button" value="查询" onclick="select();">
</form>
</div>
………………
<script type="text/javascript" language="JavaScript">
function select()
{
alert("hfjhf");
}
</script>
这个怎么失效? 展开
<script type="text/javascript" language="JavaScript">
function sayhi( na1,na2)
{
var i=25;
switch (true)
{
case i< 0:
alert("0");
break;
case i>0 && i<10:
alert("1-10");
break;
case i>10 && i<20:
alert("10-20");
break;
default:
alert("more than 20" +" "+arguments[0]+" "+arguments[1]+" "+arguments.length+" "+alert(colors[0]));
}
}
</script>
…………………………
<div>
<p>欢迎来到登录界面!</p>
<form action="#" method="post">
<input type="button" onclick="sayhi('jinbao','yy');" value="登录">
</form>
</div>
<div>
<form action="#" method="post" class="form">
<!-- <input type="text" id="username" name="username">-->
<input type="button" value="查询" onclick="select();">
</form>
</div>
………………
<script type="text/javascript" language="JavaScript">
function select()
{
alert("hfjhf");
}
</script>
这个怎么失效? 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询