我在使用 get 方法提交表单时遇到问题。
当我提交表单时,我在 index.php 的末尾得到了值(例如 /index.php?cat=138&subcat=54 ,但我希望在另一个页面上显示该值,例如 /results.php?cat=138&subcat=54
我的代码是
<script type="text/javascript" charset="utf-8">
(function($){
$(function(){
$('select').selectToAutocomplete();
$('#rezultat').submit(function(event){
$( "#rezultat" ).submit()
});
});
})(jQuery);
</script>
PHP代码是
<form method="get" id="rezutat" action="rezultati.php">
<select name="cat" id="polazak" autofocus="autofocus" autocorrect="off" autocomplete="off">
<option value="Odaberite mjesto polaska" selected="selected">...echo "</select>";
?>
<select name="subcat" id="odrediste" >
<option value="Odaberite odredište" selected="selected"></option>
<?php
</option>"."<br/>";
}
echo "</select>";
?>
<input type="submit" value="Traži">
感谢您的帮助