value 屬性可設(shè)置或返回隱藏輸入域的 value 屬性的值。
value 屬性定義了該隱藏域的默認(rèn)值。
hiddenObject.value
下面的例子可取得該隱藏域的值:
<html>
<head>
<script type="text/javascript">
function alertValue()
{
alert(document.getElementById("hidden1").value
)
}
</script>
</head>
<body>
<form>
<input type="hidden" id="hidden1" value="365jz" />
<input type="button" id="button1" onclick="alertValue()"
value="Show value of the hidden field" />
</form>
</body>
</html>
如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答?。?點擊進入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號