日期:2014-05-16 浏览次数:20917 次
<html>
<head>
<title></title>
<style type="text/css">
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script language="JavaScript" type="text/javascript">
$(function() {
$('#sel').change(function() {
if (this.value == '其他') {
$('#selInput').show();
} else {
$('#selInput').hide();
}
});
});
</script>
</head>
<body>
<select id="sel">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="其他">其他</option>
</select>
<input type="text" id="selInput" style="display:none;" />
</body>
</html>
------解决方案--------------------