<html>
<form method=post action="mailto:alex@qq.com">
<h3>您喜欢我的网页吗?</h3>
<input name="choice" type="radio" value="1">非常好<br>
<input name="choice" type="radio" value="2" checked>好<br>
<input name="choice" type="radio" value="3">一般<br>
<input type="submit" name="submit" value="send">
</form>
</html>
光标定位:
<html>
<head>
<Script language="JavaScript">
<!-- Hide
function test1(form)
{
if(form.text1.value=="")
{
alert("您没有写上任何东西,请再输入一次!")
}
else
{
alert("hi"+form.text1.value+"!,您已完成输入")
}
}
function test2(form)
{
if(form.text2.value=="" || form.text2.value.indexOf('@',0)==-1)
{
alert("请输入正确的email地址")
}
else
{
alert("您已完成输入!")
//return
alert("ddd")
}
}
function setfocus()
{
document.first.text2.focus();
return;
}
//-->
</Script>
</head>
<body onLoad="setfocus()">
<form name="first">
Enter your name:<br>
<input type="text" name="text1">
<input type="button" name="button1" value="输入测试" onClick="test1(this.form)">
<P>
Enter your Email address:<br>
<input type="text" name="text2">
<input type="button" name="button2" value="输入测试" onClick="test2(this.form)">
</body>
</html>