jquery - I get $.cookie but it do not work? -


i cookie.js @ https://github.com/carhartl/jquery-cookie when call

$(document).ready(function(){  	$("#abc").click(function() {  		var = $("#text").val();  		var b = $("#password").val();  		alert("asdasdsd  ");  		$.cookie("user",a);  		alert($.cookie("user"));  		  	});  	       });
<form>  	user: <input id="text"> </input>  	pass: <input id="password" type="password"></input>  	<button id="abc">submit</button>  </form>

it not work me. in lab, import jquery, cookie.js. thank you!

i find answer question: cookies not working in chrome! when use firefox , done well! (chrome not work localhost(use domain)


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -