Delete cookies in java script

My actual prob is [https://stackoverflow.com/questions/9428458/asp-post-back-issue-and-html-controls][1].
i try to solve this in this way.
if ($('#rdb1').attr("checked")) { document.cookie = $('#rdb1').attr("id"); check = document.cookie.split(';'); flag = check[0]; } else { document.cookie = $('#rdb2').attr("id"); check = document.cookie.split(';'); flag = check[0]; } if (flag == "rdb1") { $('#rdb1').attr("checked", true); $('#rdb2').attr("checked", false); } if (flag == "rdb2") { $('#rdb1').attr("checked", false); $('#rdb2').attr("checked", true); } its work.But how to remove cookie i dont know.I search hear and find[https://stackoverflow.com/questions/2144386/javascript-delete-cookie][2] I don't want a function.Just want to delete cookies in next button.how to do this?Thanks. [1]: https://stackoverflow.com/questions/9428458/asp-post-back-issue-and-html-controls [2]: https://stackoverflow.com/questions/2144386/javascript-delete-cookie

以上就是Delete cookies in java script的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏