Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flexͨ¹ýjavascript¶Áдcookie

×î½üÓöµ½¸öÎÊÌ⣬¿ª·¢webÏîÄ¿µÄʱºò£¬¿ÉÄÜflexÖ»ÓÃÀ´ÊµÏÖÏîÄ¿µÄ²¿·ÖÄ£¿é¡£µ±flexÐèÒªÔÚ¿Í»§¶ËдÈë/¶ÁȡһЩ״̬ÐÅÏ¢µÄʱºò£¬ÎÒÃÇ»áÏëµ½ÓÃcookie¡£flexÊDz»Ö§³ÖcookieµÄ£¬Ö»ÓÐSharedObjectÕâ¸ö±¾µØ¶ÔÏó¡£ËùÒÔ½â¾öµÄ°ì·¨¾ÍÓÐÁ½¸ö£º
flexͨ¹ýµ÷ÓÃjsÀ´ÊµÏÖ¶ÔcookieµÄ²Ù×÷£»
jsͨ¹ýflexʵÏÖ¶ÔSharedObjectµÄ²Ù×÷£»
ÕâÁ½ÖÖ·½·¨µÄ»ù´¡¾ÍÊÇʵÏÖflexºÍjavascriptµÄ½»»¥£¬×Ô¼ºÊÔ×ÅдÁ˸öСÀý×Ó£¬ÊµÏÖÁ˵ÚÒ»ÖÖ·½·¨£¬Ö±½ÓÉÏ´úÂ룺
Flex_Js_Cookie.js£º
 function SetCookie(name,value)
{
document.cookie = name+"="+escape(value);
};
function GetCookie(name)
{
var arr = document.cookie.match(new RegExp("(^|)"+name+"=([^;]*)(;|$)"));
alert(arr.length);
if(arr != null)
{
return unescape(arr[2]);
}
}
Flex_Js_Cookie.html£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<title></title>
<mce:script src="swfobject.js" mce_src="swfobject.js" type="text/javascript"></mce:script>
<mce:script src="Flex_Js_Cookie.js" mce_src="Flex_Js_Cookie.js" type="text/javascript"></mce:script>
<mce:script language=javascript><!--
var flashvars = {};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "true",
allowScriptAccess: "always",
bgcolor: "#FFFFFF"
};
var attributes = {id:"swfplayer"};
swfobject.embedSWF("Flex_Js_Cookie.swf", "swfplayer", "500", "350", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
// --></mce:script>
</head>
<body>
<div id="swfplayer"></div>
</body>
</html>

Flex_Js_Cookie.mxml£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<!--[CDATA[
import flash.external.*;
import mx.controls.Alert;

public function GetCookie():void
{
var jsFunctio


Ïà¹ØÎĵµ£º

JavaScriptÃæÏò¶ÔÏóÏê½â

ÄÚÖÃÀà
JavaScriptÊÇÒ»ÖÖ»ùÓÚ¶ÔÏóµÄ½âÊÍÐÔ±à³ÌÓïÑÔ£¬ËùÓеÄÔªËØ£¬ÎÒÃǶ¼¿ÉÒÔÀí½âΪ¶ÔÏó£¬Ã¿¸ö¶ÔÏóÒ²¿ÉÒÔÀí½âΪN¶àÊôÐԵļ¯ºÏ¡£ÔÚÌÖÂÛ×Ô¶¨ÒåÀà֮ǰ£¬ÎÒÃÇÏÈ¿´Ò»ÏÂÄÚÖõÄÀà¡£×÷Ϊ½âÊÍÐÔÓïÑÔ£¬JavaScriptÔÊÐíÎÒÃÇÔÚÈκÎʱºòΪ¶ÔÏóÌí¼ÓÊôÐÔ¡£ËùÒÔÎÒÃÇ¿ÉÒÔÏÈ¿´Ò»¶Î¼òµ¥µÄ´´½¨¶ÔÏóµÄ´úÂëƬ¶Î¡£ÕâÀïµÄ“new Object”Ò²¿ ......

javascriptÊý×é¼°Æä²Ù×÷

±¾ÎĽéÉÜÈçϼ¸¸ö·½ÃæµÄÄÚÈÝ:
1.ÈçºÎ´´½¨Êý×é
2.ÈçºÎ¶ÔÊý×é½øÐвÙ×÷£¨Ìí¼Ó,ɾ³ý,¶ÁÈ¡)
3.Êý×é³£¼û·½·¨ºÍÊôÐÔ
ÈçºÎ´´½¨Ò»¸öÊý×é,Ò»°ãµØ¸ù¾Ý³õʼ»¯É趨¼òµ¥·ÖΪ3ÖÖ:
1.µ¥´¿´´½¨Êý×é:
var arr=new Array();
Òªµã:ÓÃnew¹Ø¼ü×Ö´´½¨Êý×é¶ÔÏóArray(),Array()¶ÔÏóÊÇÒ»¸ö±¾µØÀà,¿ÉÒÔÓÃnew´´½¨Ò»¸ö¶ÔÏóºóʹÓÃ
2.´´½¨Ê ......

³£ÓÃ:javascript×Ö·û´®º¯Êý ÊÕ²Ø

³£ÓÃ:javascript×Ö·û´®º¯Êý ÊÕ²Ø
concat
½«Á½¸ö»ò¶à¸ö×Ö·ûµÄÎı¾×éºÏÆðÀ´£¬·µ»ØÒ»¸öеÄ×Ö·û´®¡£
var a = "hello";
var b = ",world";
var c = a.concat(b);
alert(c);
//c = "hello,world"
indexOf
·µ»Ø×Ö·û´®ÖÐÒ»¸ö×Ó´®µÚÒ»´¦³öÏÖµÄË÷Òý£¨´Ó×óµ½ÓÒËÑË÷£©¡£Èç¹ûûÓÐÆ¥ÅäÏ·µ»Ø -1 ¡£
var index1 = a.indexOf ......

javascript Öпؼþ±³¾°É«µÄÉèÖÃ

function Search(){
//Èç¹ûÇ°Ò»¸ö¿Ø¼þµÄÖµ´óÓÚºóÒ»¸ö¿Ø¼þµÄÖµ(Ç°ÌáÊǺóÒ»¸ö¿Ø¼þ²»ÊÇ¿Õ,¿ÕµÄÇé¿öϲ»×öÈκδ¦Àí)
 if(document.forms[0].koteifrom.value > document.forms[0].koteiTo.value && document.forms[0].koteiTo.value != ""){
  alert('messageÄÚÈÝ');
  var koteifrom ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ