为什么,我写的javasrcipt代码怎么没用,插入在ASP没起作用呢
javascript代码在最下面,前面都是用html,求解html代码没错,只是javascript没起作用
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
font-weight: bold;
}
.STYLE2 {color: #CCCCCC}
.STYLE3 {color: #FFFFFF}
-->
</style>
<div align="center" class="STYLE1">
<p>我的留言版</p>
</div>
<form name="logn" method="post" action="insert.asp" onsubmit="return check" style="background:#000000"
>
<label><span class="STYLE2">主题:
<input name="usertitle" type="text" id="usertitle" size="40" maxlength="50" />
</span></label>
<p>
<span class="STYLE2">
<label>内容: </label>
</span>
<label>
<textarea name="userbody" cols="60" rows="4" id="userbody"></textarea>
</label>
</p>
<p>
<label><span class="STYLE3">姓名:</span>
<input name="username" type="text" id="username" size="15" />
</label>
</p>
<p><span class="STYLE3">E_mail</span>:
<input name="usere_mail" type="text" id="usere_mail" size="25" />
<p>
<input type="submit" name="Submit" value="提 交" />
</p>
</form>
<p>
<label></label>
</p>
<%@language=vbscript%>
<script language="javascript">
function check()
{
if(document.logn.usertitle.value=="")
{
alert("主题不能为空");
return false;
}
if(document.logn.username.value=="")
{
alert("名字不能为空");
return false;
}
if(document.logn.usertitle.value.length>50)
{
alert("主题不能大于50个");
return false;
}
return true;
}
</script>