|
本帖最后由 juanxincai2010 于 2010-4-12 11:06 编辑
在views有一个PHP文件内容如下
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo WEBTITLE;?></title>
<script type="javascript">
function test(){
alert('ddd');
}
</script>
<body onload="test();">
<!-- top -->
<div id="top" class="clear">
<div class="logo"></div>
<div class="top_r right">
<ul>
<li><a href="#">注册</a></li>
<li>|</li>
<li><a href="#">登录</a></li>
<li>|</li>
<li><a href="#">返回百分点</a></li>
</ul>
</div>
</div>
<!--login-->
<div class="height90"></div>
<div class="weight486" ><div class="login_t clear">
<div class="login_t_l left"></div>
<ul>
<li><img src="images/user_06.gif"></li>
<li>用户注册</li>
</ul>
<div class="login_t_r right"></div>
</div>
</div>
<form method="POST" action="login/logined" id="frmList" >
<div class="weight486">
<div class="login_m">
<div class="height"></div>
<div class="func_item">
<label>用户名
<input type="text" name="username" id="username" value="" /></label>
</div>
<div class="func_item">
<label>密 码
<input type="text" name="password" id="password" value="" /></label>
</div>
<div class="func_ite">
<div class="left"><input name="" type="checkbox" value=""><span>记住密码</span></div>
<div class="left"><input name="imageField" type="image" src="images/user_09.gif" width="77" height="30" border="0" ></div>
<input type="button" name="btndd" value="btn" onclick="test();" />
</div>
<div class="func_ite">
<div class="left"><a href="#">新用户注册</a></div>
<div class="forget"><a href="#">忘记密码</a><span>?</span></div>
</div>
</div>
</div>
<div class="login_b weight486">
<div class="login_b_l left"></div>
<div class="login_b_r right"></div>
</div>
</form>
<!--bottom-->
<div class="bottombg"></div>
<div id="footer">
<div class="icon_l_t"><!--nochar--></div>
<div class="footertext left"><a href="mailto:email@email.com">技术咨询:email@email.com</a></div>
<div class="icon_r_t"><!--nochar--></div>
</div>
</body>
</html>
页面出错了,问题在于找不到JS方法test() ,请问这是怎么回事? |
|