随笔分类 - Jquery/javascript
摘要:网上关于cookie跨域访问的解决方法不少其中包括iframe,P3P等,本例以P3P为例。在C:\Windows\System32\drivers\etc\hosts中添加如下代码127.0.0.1 www.a.com127.0.0.1 www.b.com设置cookie的页面,a_setcookie.php<?php header('P3P: CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR
阅读全文
摘要:稍微研究了一下,服务器如何获取用户的信息做了一个整理。cs代码 通过反射来访问类的实例属性和属性值using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Text;using System.Reflection;using System.Text.RegularExpressions;namespace Whoru{ public partial clas...
阅读全文
摘要:读取name属性:$('#retReason').attr("name")修改name属性:$('#retReason').attr("name","testvalue");
阅读全文
摘要:$("#goback").click(function(){location.href="{{ path('_h710_index') }}"; });
阅读全文
摘要:每个cookie都是一个名/值对,可以把下面这样一个字符串赋值给document.cookie:document.cookie="userId=828";如果要一次存储多个名/值对,可以使用分号加空格(; )隔开,例如:document.cookie="userId=828; userName=hulk";在cookie的名或值中不能使用分号(;)、逗号(,)、等号(=)以及空格。在cookie的名中做到这点很容易,但要保存的值是不确定的。如何来存储这些值呢?方法是用escape()函数进行编码,它能将一些特殊符号使用十六进制表示,例如空格将会编码为“2
阅读全文
浙公网安备 33010602011771号