<script language="javascript">
function checkInput()
{
if(document.getElementById("txt1").value=="")
{
alert("输入框不能为空");
return false;
}
else if(document.getElementById("txt1").value.substring(0,1)=="0")
{
alert("输入框第一位不能为0");
return false;
}
else if(!document.getElementById("rd1").checked)
{
alert("请选中单选框");
return false;
}
else 
return true;
}
</script>
<body>
<form name="ss">
<input name="txt1" type="text" id="txt1">
<input name="rd1" id="rd1" type="radio" value="radiobutton">
<input type="submit" name="Submit" value="Submit" onclick="return checkInput()">
</form>
</body>