我制作了一个HTML表单,可以在我的网站上添加一个朋友,我希望能够通过我提供的链接提交。我曾尝试做onClick="form.submit();"
,但没有奏效。我做了一个HTML表单,我想用链接提交它
</head>
<body>
<div class="Forum-Block">
<div class="Top-Bar">
<a href="http://site/Forum.php"><div class="Back-Box">Back</div></a>
<a href="http://site/ShowFriends.php"><div class="FriendsB-Box">Friends</div></a>
<a href="http://site/ShowSentRequests.php"><div class="RequestsB-Box">Sent Requests</div></a>
<a href="http://site/AddFriend.php"><div class="SendRequestB-Box">Send Request</div></a>
</div>
<div class="FriendRequestSend-Box">
<form method="post">
<input type="text" name="friendname"/>
<br/>
<a href="http://site/AddFriendPHP.php" onclick="form.submit();"><div class="FriendRequestSend-Button">Send</div></a>
</form>
</div>
</div>
</body>
为什么它不工作,你得到了什么错误,你有没有尝试过其他的东西。 http://stackoverflow.com/help/how-to-ask – Mathemats