用javascript实现
window.open(url,'newwin','top=180,left=200,width=200,height=200,toolbar=no,status=no,scrollbars=no');用你的地址替换URL就可以了。
window.open(url,'newwin','top=180,left=200,width=200,height=200,toolbar=no,status=no,scrollbars=no');用你的地址替换URL就可以了。
alert("不存在");
</script>
window.open(url,'newwin','top=180,left=200,width=200,height=200,toolbar=no,status=no,scrollbars=no');用你的地址替换URL就可以了。
function check()
{
if username已存在 then
{
alert("用户名已存在");
return;
}
}
</script><input type="button" value="注册" onclick="check();">
另外楼主的意思是在serlvet里写这些逻辑,script能在servlet里用吗。请指点
jsp中可以使用script,jsp经过服务器编译后生成的servlet,所以servlet中也可以用script