<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>login</title><script type="text/javascript">
function btRegister(){
alert("register()");
window.self.location="register.do";
}
</script>
</head>
<body>
<form action="login.do" method="post"><strong>
用户名:</strong><input type="text" name="username"><br><strong>
密码 :</strong><input type="password" name="password"><br>
普通用户:<input type="radio" name="type" checked="checked" value="user">
管理员:<input type="radio" name="type" value="admin"><br>
<input type="submit" value="登录">
<input type="button" value="注册" onclick="btRegister()">
</form>
</body>
</html>
点击注册按钮时没有预期的反应,函数没有调用,希望高手给与解答,不胜感激!!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>login</title><script type="text/javascript">
function btRegister(){
alert("register()");
window.self.location="register.do";
}
</script>
</head>
<body>
<form action="login.do" method="post"><strong>
用户名:</strong><input type="text" name="username"><br><strong>
密码 :</strong><input type="password" name="password"><br>
普通用户:<input type="radio" name="type" checked="checked" value="user">
管理员:<input type="radio" name="type" value="admin"><br>
<input type="submit" value="登录">
<input type="button" value="注册" onclick="btRegister()">
</form>
</body>
</html>
点击注册按钮时没有预期的反应,函数没有调用,希望高手给与解答,不胜感激!!
解决方案 »
- ie下获得文本焦点的位置
- 鼠标移到箭头处时,图片移动!!
- [分享]Javascript汉字截取和input标签汉字限制长度
- 有关正则表达式
- 请问如何隐藏hash
- 消息框乱码问题
- windows.open("c:\\a.txt")拒绝访问
- 关于三维数组的大小
- 我使用window.open与window.showModalDialog和打开的页面高度和宽度为什么不一样?我想使用showModalDialog打开页面大小为width:320px,hei
- 如何添加延时命令?
- 用JS怎么实现复制TABLE中某一列的数据并填充到其它列
- 怎么使用Javascript或jquery鼠标移动到一张图片时变为另一张图片图片,图片产生颤抖的效果
我用的开发环境是tomcat+MyEclipse+SSH,还是不能触发函数!
不知道是不是和我用的环境有关系??