首页 > 代码库 > juery mobile select下来菜单选项提交form问题
juery mobile select下来菜单选项提交form问题
注意: data-native-menu="false" 虽然具有渲染作用,但是无法进行js提交。
<script type="text/javascript">
$(function() {
$("#category").change(function() {
loadData();
});
});
function loadData(){
document.forms["form1"].submit();
}
</script>
<?php
$categoryid=$_POST[category];
$circleid=$_POST[businessCircle];
?>
<form id="form1" name="form1" data-ajax="false" action="shangyequanb.php" method="post" enctype="multipart/form-data">
<select id="category" name="category" data-corners="false" >
<option value="http://www.mamicode.com/1" <? if($categoryid=="1"){ echo "selected";}?>>类别1</option>
<option value="http://www.mamicode.com/2"<? if($categoryid=="2"){ echo "selected";}?>>类别2</option>
<option value="http://www.mamicode.com/3"<? if($categoryid=="3"){ echo "selected";}?>>类别3</option>
<option value="http://www.mamicode.com/4"<? if($categoryid=="4"){ echo "selected";}?>>类别4</option>
<option value="http://www.mamicode.com/5"<? if($categoryid=="5"){ echo "selected";}?>>类别5</option>
</select>
</form>