-2
我正在使用jquery獲取cookie值。使用jquery獲取cookie值
我寫了這個:
alert("hi");
alert($.cookie('product_code',{ path:'/'}));
,但我得到以下錯誤:
jQuery is not defined. $ is not defined
請幫我....
我正在使用jquery獲取cookie值。使用jquery獲取cookie值
我寫了這個:
alert("hi");
alert($.cookie('product_code',{ path:'/'}));
,但我得到以下錯誤:
jQuery is not defined. $ is not defined
請幫我....
的jQuery
對象不存在。在運行此代碼之前,請首先將其包含(通過指向其定義的script
元素)和$.cookie()
的定義。
我加入了這一點,但我仍收到錯誤 – user985225
@ user985225再次仔細閱讀了答案。 – alex