我創建了一個在webkit瀏覽器中運行的應用程序,它將提交表單(輸入字段類型爲隱藏),點擊提交按鈕。它對我來說工作得很好。在不打開應用程序的情況下自動提交表單
有沒有什麼辦法可以在星期一不打開應用程序的情況下提交表單。在下面
我的形式的示例代碼:
<html>
<script language="javascript">
function init()
{
SnmpGet(null,"public",".1.8.53.3.6.1.7.1", model, modelfail);
}
function model(request, response)
{
var modelresp = SnmpParseGet(response);
document.getElementById("model").value = modelresp.returnValue;
SnmpGet(null,"public",".1.8.53.3.6.1.3.1", serialno, serialnofail);
}
function modelfail(request, response)
{
}
function serialno(request, response)
{
var serialnoresp = SnmpParseGet(response);
document.getElementById("sno").value = serialnoresp.returnValue;
}
function serialnofail(request, response)
{
}
</script>
<body>
<form action="http://mywebsite/submit.php" method="post" id="form1">
<input type="hidden" id="sno" value="sno" name="sno">
<input type="hidden" id="model" value="model" name="model">
<input type="submit" value="Submit" class="submitbutton" border="2" >
</form>
</body>
</html>
的任何意見或建議高度讚賞。
感謝,
請告訴我們你到目前爲止已經完成了什麼來解決你的問題。你的javascript方法在哪裏? – andreas
有沒有與此表單相關的任何javascript/jquery代碼? –
是的我正在使用javascript來更改隱藏字段的值(編輯示例代碼) – dcthaju