0
加載頁面時,我需要檢查會話變量是否存在或不是來自Javascript。我試了下面的代碼。但它給出了一個錯誤,說會話是未定義的。檢查頁面加載時的會話變量
Json=// i have hardcoded value here
Session("hai") = "";
Session.set("hai",json);
if ((typeof session.get("hai") == 'undefined' && ((session.get("hai") == null)||(session.get("hai") == ""))){
}
有沒有'Session'或'默認在JavaScript session'。我並不是真的想要做什麼,但它不能像那樣工作。 – Magus