本站收集了一篇jQuery相关的编程文章,网友闻贞静根据主题投稿了本篇教程内容,涉及到jQuery、Form、表单提交、jQuery Form 页面表单提交的小例子相关内容,已被492网友关注,涉猎到的知识点内容可以在下方电子书获得。
jQuery Form 页面表单提交的小例子
<script type="text/javascript" src="${ctx}/js/jquery.form.js"></script>
<script type="text/javascript">
//创建测试实例
function createInstance() {
var options = {
success : function(json) {
if (json.succ) {
alert(json.info);
window.parent.ymPrompt.doHandler("close", true);
}
}
};
$("#f1").ajaxSubmit(options);
}
//关闭按钮
function closeWindow() {
window.parent.ymPrompt.doHandler("close", true);
}
</script>
Form表单:
<form id="f1" name="f1" action="${ctx}/process/createInstance.do"
method="post">
<table >
<tr>
<td nowrap="nowrap" >测试名称:</td>
<td><input type="text" name="name" value="${instance.name}"
/><em class="em_user_manage">*</em>
</td>
</tr>
<tr>
<td nowrap="nowrap" >测试场景:</td>
<td><input type="text" name="scene"
value="${instance.scene}" /><em class="em_user_manage">*</em>
</td>
</tr>
<tr>
<td nowrap="nowrap" >测试目标:</td>
<td><textarea type="text" name="goal" id="goal" cols="32"
rows="7">${instance.goal}</textarea>
</td>
</tr>
<tr>
<td nowrap="nowrap" >测试说明:</td>
<td><textarea type="text" name="description" id="description"
cols="32" rows="7">${instance.description}</textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="hidden"
name="extProcessDefinitionId"
value="${instance.extProcessDefinitionId}" /><input type="hidden"
name="signIn" value="${instance.signIn}" /><input type="hidden"
name="definitionId" value="${instance.definitionId}" /><input
type="button" value="确定" onclick="createInstance();" /><input
type="button" value="取消" onclick="closeWindow();" /></td>
</tr>
</table>
</form>