form 屬性可返回對(duì)包含該確認(rèn)按鈕的表單的引用。
若成功,該屬性返回一個(gè)表單對(duì)象。
submitObject.form
下面的例子將返回該確認(rèn)按鈕所屬的表單的 id:
<html>
<body>
<form id="form1">
<input type="submit" id="submit1" />
</form>
<p>The id of the form containing the submit button is:
<script type="text/javascript">
x=document.getElementById('submit1');
document.write(x.form.id
);
</script></p>
</body>
</html>
如對(duì)本文有疑問,請(qǐng)?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會(huì)為你解答!! 點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號(hào)