【发布时间】:2016-08-12 07:11:12
【问题描述】:
我创建了一个在 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 方法在哪里?
-
有没有和这个表单相关的javascript/jquery代码?
-
是的,我正在使用 javascript 来更改隐藏字段的值(编辑了示例代码)
标签: javascript jquery html forms webkit