Javascriptµ¼³öExcel
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>WEBÒ³Ãæµ¼³öΪEXCELÎĵµµÄ·½·¨</title>
</head>
<body>
<table id="tableExcel" width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5" align="center">
WEBÒ³Ãæµ¼³öΪEXCELÎĵµµÄ·½·¨</td>
</tr>
<tr>
<td>
ÁбêÌâ1</td>
<td>
ÁбêÌâ2</td>
<td>
ÁбêÌâ3</td>
<td>
ÁбêÌâ4</td>
<td>
ÁбêÌâ5</td>
</tr>
<tr>
<td>
aaa</td>
<td>
bbb</td>
<td>
ccc</td>
<td>
ddd</td>
<td>
eee</td>
</tr>
<tr>
<td>
AAA</td>
<td>
BBB</td>
<td>
CCC</td>
<td>
DDD</td>
<td>
EEE</td>
</tr>
<tr>
<td>
FFF</td>
<td>
GGG</td>
<td>
HHH</td>
<td>
III</td>
<td>
JJJ&
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
function getCookies(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return '';
}
function setCookie(name, value, expires,
function getCookies(name)
{
var a ......
·Ò룺Ϊ֮Âþ±Ê
Á´½Ó£ºhttp://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html
¼ò½é
»ùÓÚ¶ÔÏóµÄÊôÐÔÃû½âÎö
ÖµµÄÖ¸¶¨
ÖµµÄ¶ÁÈ¡
±êʶ·û½âÎö¡¢Ö´Ðл·¾³ºÍ×÷ÓÃÓòÁ´
Ö´Ðл·¾³
×÷ÓÃÓòÁ´Óë [[scope]]
±êʶ·û½âÎö
±Õ°ü
×Ô¶¯À¬»øÊÕ¼¯
¹¹³É±Õ°ü
ͨ¹ý±Õ°ü¿ÉÒÔ×öʲô£¿
Àý 1£ºÎªº¯Êý ......
×î½üһֱΪ´ËÍ·Í´£¬¹ÃÇÒ°ÑÎÒÄÜÏëµ½µÄ¶«Î÷¶¼Ð´³öÀ´°É¡£ÓÉÓÚ²»ÊǼòµ¥°ÑÒ³ÃæÉÏÊÖдµÄscriptתΪjavascriptÌí¼Ó£¬ÎÒÃÇÐèÒª¿¼ÂǵĶ«Î÷Ö÷ÒªÓÐÁ½¸ö£º¼ÓÔصÄ˳Ðò£¬¼ÓÔØÇ°ºó½Å±¾µÄÔË×÷¡£
ÏÈ˵µÚÒ»¸ö£¬¼ÙÈçÎÒÃÇÒÑÓÐÒ»¼ÓÔØ»úÖÆÁË£¬Òª¼ÓÔØÒ»¸öÐÂÄ£¿é£¬µ±È»ÐÂÄ£¿éÊÇÔÚÁíÒ»¸öJSÎļþÖС£Õâʱ£¬ÎÒÃÇ¿ÉÒÔÃèÊöΪ£º
loader ---> a.js
Õâ¸ö¼Ó ......
/**
* JavaScript ÊÇÃæÏò¶ÔÏóµÄÓïÑÔ£¬µ«ÊÇËûµÄÃæÏò¶ÔÏó²»ÊÇ»ùÓÚÀàµÄ£¬ÊÇ»ùÓÚÔÐ͵Ä;
* µ«ÊÇËûµÄһЩÌØÐÔ(º¯ÊýÊÇÊý¾Ý)£¬Ê¹µÃËü¿ÉÒÔÄ£Äâ»ùÓÚÀàµÄÃæÏò¶ÔÏ󣬵«ÊÇ JavaScript ²¢²»Ö§³ÖºÍ Java Ò»ÑùµÄÀ࣬
* Òò´Ë JavaScript ÖеÄ"Àà"¿ÉÒÔ³Æ×÷"αÀà"
*/
//
/**
* ¹¹Ô캯Êý: js ÖÐÓÃÀ´ºÍ new ÔËËã·ûÒ»ÆðʹÓõĺ¯Êý³Æ× ......