测试onclick

<html> 
<head> 
<script type="text/javascript"> 
	function test() { 
	document.mainForm.username.value=""; 
	document.mainForm.s1.value=""; 
} 
</script> 
</head> 
<body>
	<form name="mainForm"> 
		<input type="radio" name="" onclick="test()"> 
		<input type="text" name="username"> 
		<select name="s1"> 
		<option name="w">Women</option> 
		<option name="m">Man</option> 
		</select> 
	</form>
</body>
</html>

你可能感兴趣的:(java)