Recently I study html and javascript. I know that in html form sends data to server between and .
However, in my case it doesn't.
here is my code
function wReply() {
if(document.getElementById("repInputContent").value == "") {
alert("type anything for reply");
document.getElementById("repInputContent").focus();
return;
}
document.reply.submit();
}
this is javascript function that work with input type button.
And this is html form code
<tr id="replyInput">
<td colspan="3">
<form action="/wReply" accept-charset="utf-8" name="reply" method="post">
<input type="hidden" name="num" value="<%=num%>">
<input type="hidden" name="writer" value="<%=writer%>">
<input type="hidden" name="page" value="<%=page%>">
<textarea rows="4" cols="40" id="repInputContent"></textarea>
</form>
</td>
<td><input type="button" value="submit" onclick="wReply()"></td>
</tr>
I code a table and want to send hidden type datas and textarea data. I think it works but actually server can receive hidden type datas.
What is the problem?
Aucun commentaire:
Enregistrer un commentaire