我目前有一块jQuery,我已经包含了这个似乎在我已经测试但是在移动设备和另一台计算机上的工作正常,我有人测试它仍然会去旧的URL,但我怀疑它可能是一个缓存问题,但有没有办法来开发一个PHP的回落?如果选择了值,PHP下拉菜单
如果选择了prop2
值,我想要做什么我想更改表单动作url几乎onclick像jQuery一样。
HTML:
<form action='bookingurl' method='get'>
<label for='channel_code' class="caption">Select property </label>
<select id='channel_code' name='id'>
<option value='prop1'>Prop 1</option>
<option value='prop2'>Prop 2</option>
</select>
</form>
的jQuery:
jQuery(document).ready(function(){
jQuery('#channel_code').change(function(){
if(jQuery('#channel_code').val() == 'prop2'){
window.location.href = 'https://hotels.cloudbeds.com/reservation/url';
}
});
});
'如果($( '#CHANNEL_CODE选项:选择'。)VAL()== 'PROP2'){'试试这个 – guradio