function CheckIfChecked(){
var strChoices = "";
var chk = document.getElementsByName("check_list[]");
var chklength = chk.length;
var e = document.getElementById("select_bulk");
var strUser = e.options[e.selectedIndex].value;
var buttn = document.getElementById("bulk");
Cookies.set(chk, e, strUser, butttn);}
//想要在下面的php代码中检索这个cookie 如果(isset($ _ COOKIE [ 'buttn'])) {//做点什么 }
答案 0 :(得分:1)
试试这个, 在javascript中
var key = "aaa"
var val = "bbb"
document.cookie = key + "=" + val;
在php中
print_R($_COOKIE);