Javascript Unicode ±àÂëºÍ·´±àÂ뺯Êý
<script language = "JavaScript">
function unicode(s){
var len=s.length;
var rs="";
for(var i=0;i<len;i++){
var k=s.substring(i,i+1);
rs+="&#"+s.charCodeAt(i)+";";
}
return rs;
}
function runicode(s){
var k=s.split(";");
var r="";
for(var x=0;x<k.length;x++){
var m=k[x].replace(/&#/,"");
r += String.fromCharCode(m);
}
return r;
}
</script>
Ïà¹ØÎĵµ£º
JavascriptË¢ÐÂÒ³ÃæµÄ¼¸ÖÖ·½·¨£º
³ÌÐò´úÂë
1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refres ......
Ö±½ÓʹÓÃ䶨ÒåµÄJavascript±äÁ¿Ê±£¬Ò³Ãæ»á±¨´í²¢ÎÞ·¨Ö´ÐУ¬±ÈÈç
if (varName=="")
{
}
ÐèÒªÏÈÅжϱäÁ¿ÊÇ·ñ¶¨Ò壬ʹÓÃtypeofº¯Êý¿ÉÒÔÅжϣ¬ÈçÏÂʹÓãº
if (typeof(ipaddr)=='undefined')
{
window.alert('ipaddr䶨Òå');
} ......
POST´úÌæFORM
<SCRIPT language="VBScript">
Function URLEncoding(vstrIn)
strReturn = ""
For i = 1 To Len(vstrIn)
ThisChr = Mid(vStrIn,i,1)
If Abs(Asc(ThisChr)) ......
µ¥Ìåģʽ
Óŵã:°Ñ´úÂë×éÖ¯µÃÒ»Ö²¢¸ôÀë,¸üÈÝÒ×ÔĶÁºÍά»¤,Ìá¸ßÎȶ¨ÐÔ;ÓÃÓÚÓÅ»¯,ÌáÉýÐÔÄÜ
ȱµã:¿Éµ¼ÖÂÇ¿ñîºÏ
5.1 µ¥ÌåµÄ»ù±¾½á¹¹
var Singleton = {
attribute1 : true,
attribute2 : 10,
method1 : function(){},
method2 : function(){}
};
Ñϸñ°´¶¨ÒåÀ´Ëµ,C1²»ÊÇÒ»¸öµ¥Ìå,ÒòΪËü²»ÊÇÒ»¸ö¿ÉʵÀ ......
function getQueryString(queryStringName)
{
var returnValue="";
var URLString=new String(document.location);
var serachLocation=-1;
var queryStringLength=queryStringName.length;
do
{
serachLocation=URLString.indexOf(queryStringName+"\=");
if ......