<script language="javascript">
<!--
function form1_onsubmit()
{
var urlreg=/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/
var url=document.form1.url.value
if (!urlreg.test(url))
{
alert("请输入正确的站长主页!");
document.form1.url.focus()
return false
}
}
-->
</script>
回车键提交
<form name="form1" method="post" action="" onsubmit="return form1_onsubmit()">
网址:<input type="text" name="url">
</form>