<html>
<script language="javascript">
function checklogin()
{
if((login.nickname.value!="")&&(login.password.value!=""))
{
return true;
}
else
{
alert("不能为空!")
return false
}
}
</script>
<body>
<center><h2>haha</h2>
<form action="/ide/data/search1.php" method="post" name="login"
onsubmit="return checklogin()">
呢称:<input name="nickname" size=10><br>
密码:<input name="password" type="password" size=10><br>
<input name="submit" type="submit" value="登陆">
</form>
<hr>
<font color="#3300cc">首次登陆时<br>将自动注册</font>
</center>
</body>
</html>
<script language="javascript">
function checklogin()
{
if((login.nickname.value!="")&&(login.password.value!=""))
{
return true;
}
else
{
alert("不能为空!")
return false
}
}
</script>
<body>
<center><h2>haha</h2>
<form action="/ide/data/search1.php" method="post" name="login"
onsubmit="return checklogin()">
呢称:<input name="nickname" size=10><br>
密码:<input name="password" type="password" size=10><br>
<input name="submit" type="submit" value="登陆">
</form>
<hr>
<font color="#3300cc">首次登陆时<br>将自动注册</font>
</center>
</body>
</html>
解决方案 »
- 循环内的公式不一致怎么写一个函数?
- Fatal error: Call to undefined function http_post_fields() in
- 谁能不运行程序将正确结果算出来?陷阱多多!
- 快帮我看看,很简单的问题就是不对,我晕了
- function w(){ document.write( '测试' ) }; 直接执行和通过AJAX调用结果不同?
- 求助 本地搭建的php+apache+mysql开发网站不小心卸载了 如何重新安装
- [新手求助] 请问,为什么字符串连接符,不加括号,输出异常?
- php 程序有可能让服务器当机 吗
- 参数如何类似这样传递?(可能有些难)
- 如何将表单填写好后直接发送到指定邮箱?
- 为什么用chdir()不好用了,是服务器把这个函数给屏蔽了?如果要看怎么做?
- 一个有关limit的问题:
你在登陆按钮哪里应该改一下!
<input name="submit" type="submit" value="登陆" onclick="return checklogin()"
>