获取JS选择到的多个ID,传参数跳转到PHP页面 本帖最后由 haihao_110 于 2011-02-09 16:15:11 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 假设你设置的COOKIE名称是 ids,代码修改如下即可:<script type=”text/javascript”>function SetCookie(name,value,expire) {var exp = new Date();exp.setTime(exp.getTime() + expire);document.cookie = name + “=”+ escape (value) + “;expires=” + exp.toGMTString();}function getCookie(name) {var arr = document.cookie.match(new RegExp(“(^| )”+name+”=([^;]*)(;|$)”));if(arr != null) return unescape(arr[2]); return null;}function delCookie(name){var exp = new Date();exp.setTime(exp.getTime() - 1);var cval=getCookie(name);if(cval!=null) document.cookie= name + “=”+cval+”;expires=”+exp.toGMTString();}</script><input name="" id="u427" type="button" class="hand fL" disabled value="开始对比" onclick="window.open('compare.php?hotel_id='+getCookie('ids'))"; /> php初学者 求教FLASH和PHP的SOCKET通信的问题 phpedit xdebug 如何配置? 数据库 查询 急求救PHP解析类的时候错误,小弟急等 差最后一步了,帮助。 找在福州工作的人,做一个网站,要求程序+美工组合 php 正则匹配一个三级导航 网站同时开启DZ的UC登录整合和QQ快捷登录碰到难题了 这些函数我测试的结果怎么和他说的不一样? 求php时间算法问题。 [求助]问一个附件上传的判断的问题
假设你设置的COOKIE名称是 ids,代码修改如下即可:<script type=”text/javascript”>
function SetCookie(name,value,expire) {
var exp = new Date();
exp.setTime(exp.getTime() + expire);
document.cookie = name + “=”+ escape (value) + “;expires=” + exp.toGMTString();
}function getCookie(name) {
var arr = document.cookie.match(new RegExp(“(^| )”+name+”=([^;]*)(;|$)”));
if(arr != null) return unescape(arr[2]); return null;
}function delCookie(name){
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(name);
if(cval!=null) document.cookie= name + “=”+cval+”;expires=”+exp.toGMTString();
}
</script>
<input name="" id="u427" type="button"
class="hand fL" disabled value="开始对比" onclick="window.open('compare.php?hotel_id='+getCookie('ids'))"; />