var getUserInfoFromC = function() { var current_user = []; current_user.id = 0; current_user.name = ''; var cookie_user = document.cookie.match(".*_user=(.*)"); if (cookie_user != null) { cookie_user_matched = cookie_user[1].split('%2C'); current_user.id = cookie_user_matched[0]; current_user.name = decodeURI(cookie_user_matched[1]); } return current_user; }; 因?yàn)檫@里的cookie_user_matched變量為全變量,而且沒有聲明
jshint的時(shí)候,grunt報(bào)錯(cuò),說為一個(gè)變量為只讀的,請大家指教。
素胚勾勒不出你
2018-08-04 11:25:42