我需要的按鈕,「clickButton」的ID設置爲自動點擊或「激活」只是有人加載頁面:如何自動點擊輸入按鈕
<html>
<head>
</head>
<body>
<center>
<form method="post" action="http://web.com/">
<input type='hidden' value="test" id="chatbox" name='content' />
<!-- The Button -->
<input id="submitButton" class="button" name="accept" type="submit" value="Send"/>
</form>
</center>
</body>
</html>
我曾嘗試:
<html>
<head>
<script type="text/javascript">
//In here I would use several Javascript codes,
//including all the ones I have been given
//here
</script>
</head>
<body>
<center>
<form method="post" action="http://web.com/">
<input type='hidden' value="test" id="chatbox" name='content' />
<!-- The Button -->
<input id="submitButton" class="button" name="accept" type="submit" value="Send"/>
</form>
</center>
</body>
</html>
此外,如果我想要一個JavaScript代碼重複自我,我會使用什麼命令?
非常感謝您的幫助。
請出示我們試過什麼; SO並不是免費的服務來爲你寫代碼。 – Daedalus
http://stackoverflow.com/questions/3273154/how-to-cause-a-form-to-be-submitted-automatically-on-page-load-in-javascript – tilda