我有一个跨越 jQuery Mobile 中多个页面的表单。我正在使用多页页面,所有页面周围都有一组表单标签。在我将其分成多个页面之前,此表单运行良好。现在它发送文本框数据,但单选按钮的值为空白。有任何解决这个问题的方法吗。以下是带有收音机的 2 页示例。
谢谢!
<div id="1" data-role="page" data-theme="c">
<div data-role="header" data-theme="b" data-position="fixed">
<a data-theme="a" class="ui-btn-right" href="#start" data-role="button" data-icon="back" data-transition="pop" data-rel="dialog" data-inline="true">Start Over</a></div>
<div data-role="content">
<form encoding='multipart/form-data' encType='multipart/form-data'>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend><a href="#16pop" data-rel="popup" data-inline="true">Azimuth Verification</a></legend>
<input id="_fid_16_a" type="radio" name="_fid_16" value="Yes"/>
<label for="_fid_16_a">Yes</label><input id="_fid_16_b" type="radio" name="_fid_16" value="No"/>
<label for="_fid_16_b">No</label><input id="_fid_16_c" type="radio" name="_fid_16" value="N/A"/>
<label for="_fid_16_c">N/A</label>
</fieldset>
</div>
</div></div>
<div id="sigemail" data-role="page" data-theme="c">
<div data-role="header" data-theme="b" data-position="fixed">
<a data-theme="a" class="ui-btn-right" href="#start" data-role="button" data-icon="back" data-transition="pop" data-rel="dialog" data-inline="true">Start Over</a></div>
<div data-role="content">
<div data-role="fieldcontain"><label for="_fid_210">What email address would you like to use?</label><input type="text" name="_fid_210" id="_fid_210" /></div>
<input type="button" value="Submit" data-theme="b" id="sendbtn" onclick="$.mobile.loading( 'show', {text: 'Sending... Please Wait', textVisible: true, theme: 'b'});" />
</form>
<script>
$(document).ready( function(){
getLocationConstant();
$('#sendbtn').click(function(){
$.post(
'fill.php',
$('form').serialize(),
function() {
$.post(
'https://www.quickbase.com/db/dbName?act=API_AddRecord',
$('form').serialize()
);
$.mobile.changePage('#successpop', {transition: 'pop', role: 'dialog'});
}
).error(function errHandler() {$.mobile.changePage('#failpop', {transition: 'pop', role: 'dialog'})});
});
});
</script>
</div></div>