打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
如何:启用客户端脚本调试
<html><head><script language="JavaScript">function set (){ var expdate = new Date();  expdate.setMonth(expdate.getMonth()+6); alert("setting cookie \""+form1.txtName.value+"\" to \""+form1.txtValue.value+"\""); setCookie(form1.txtName.value, form1.txtValue.value, expdate); }function get (){ alert("getting cookie \""+form1.txtName.value+"\""); var c = getCookie(form1.txtName.value); alert( "cookie = "+c ); form1.txtValue.value = c;}function getCookie (sCookieName){ var sName=sCookieName+"=", ichSt, ichEnd; var sCookie=document.cookie; if ( sCookie.length && ( -1 != (ichSt = sCookie.indexOf(sName)) ) ) {    if (-1 == ( ichEnd = sCookie.indexOf(";",ichSt+sName.length) ) )    ichEnd = sCookie.length;    return unescape(sCookie.substring(ichSt+sName.length,ichEnd)); } return null;}   function setCookie (sName, vValue){ var argv = setCookie.arguments, argc = setCookie.arguments.length; var sExpDate = (argc > 2) ? "; expires="+argv[2].toGMTString() : ""; var sPath = (argc > 3) ? "; path="+argv[3] : ""; var sDomain = (argc > 4) ? "; domain="+argv[4] : ""; var sSecure = (argc > 5) && argv[5] ? "; secure" : ""; document.cookie = sName + "=" + escape(vValue,0) + sExpDate + sPath + sDomain + sSecure + ";";}    function deleteCookie (sName){ document.cookie = sName + "=" + getCookie(sName) + "; expires=" + (new Date()).toGMTString() + ";";}</script></head><body><form name=form1>   cookie name:<input type="text" name="txtName" value="ASPCLIENTDEBUG"><p>   cookie value:<input type="text" name="txtValue" value="doesn't matter"><p>   <input type="button" value="Set Cookie" onClick="set()">   <input type="button" value="Get Cookie" onClick="get()"></form></body></html>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
隐藏网页源代码方法汇总
网页经典代码(3)-制作技巧-网页制作大宝库
JS读取cookie(记住账号密码)
动态CSS,换肤技术
javascript操作cookies
一分钟解读js与PHP 设置cookie的相互读取(附代码)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服