close
在內文中顯示值
.php↓
<!DOCTYPE html>
<html >
<body>option1:
<select id="op1">
<option VALUE='1'>1</option>
<option VALUE='2'>2</option>
<option VALUE='3'>3</option>
</select>
option2:
<select id="op2" >
<option VALUE='4'>4</option>
<option VALUE='5'>5</option>
<option VALUE='6'>6</option>
</select>
<button onclick="show();">show</button><br>
<br><br>
<p id="s1"></p>
<p id="s2"></p>
</body>
<script type="text/javascript">
function show(){
var a=document.getElementById("op1").value;
var b=document.getElementById("op2").value;
document.getElementById("s1").innerHTML='option1: '+a;
document.getElementById("s2").innerHTML='option2: '+b;
}
</script>
</html>
完成!
文章標籤
全站熱搜
留言列表