【发布时间】:2012-12-31 14:38:40
【问题描述】:
jQuery("#changeCoinCountrySelect").change(function(){
// Get value from select box
var country = jQuery('#changeCoinCountrySelect option:selected').val();
jQuery("#coinTable").load(".../.../.../tables.php?country="+country);
});
我的问题是,如果 country 具有值 Great British 例如,那么在 tables.php 中,查看 $_GET['country'] 时,只有 Great > 被记录下来。
因此,我认为可能存在 HTML 没有被 jQuery 编码的问题。
可能的解决方案,html 编码国家变量,然后在 php 脚本中解码。问题是这似乎对空格没有任何作用!
我是 jQuery 的灾难,所以如果有人能指出我正确的方向吗?
【问题讨论】: