JavaScript Access´úÂë²Î¿¼
///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
//ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
var path = filePath + "MyData.mdb";
//È¥µô×Ö·û´®ÖÐ×îÇ°ÃæµÄ"files://"Õâ8¸ö×Ö·û¡£
path = path.substring(8);
var updateCnt = 0;
//Éú³É²éѯºÍ¸üÐÂÓõÄsqlÓï¾ä¡£
var sqlSelCnt = "SELECT COUNT from [COUNT] WHERE ID = 'count'";
var sqlUpdCnt = "UPDATE [COUNT] SET [COUNT] = '";
//½¨Á¢Á¬½Ó£¬²¢Éú³ÉÏà¹Ø×Ö·û´®
var con = new ActiveXObject("ADODB.Connection");
con.Provider = "Microsoft.Jet.OLEDB.4.0";
con.ConnectionString = "Data Source=" + path;
con.open;
//rs¼Ç¼±íµÄ½¨Á¢
var rs = new ActiveXObject("ADODB.Recordset");
rs.open(sqlSelCnt, con);
while (!rs.eof) {
var cnt = rs.Fields("COUNT");
document.write(cnt);
//½«È¡µÃ½á¹û¼Ó1ºó¸üÐÂÊý¾Ý¿â¡£
updateCnt = cnt * 1 + 1;
rs.moveNext;
}
rs.close();
rs = null;
sqlUpdCnt = sqlUpdCnt + updateCnt + "'";
con.execute(sqlUpdCnt);
con.close();
con = null;
}
//ÏÂÃæÊÇÓëÎı¾½¨Á¢ÁªÏµ
function getCountfromTxt() {
var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
var path = filePath + "count.txt";
path = path.substring(8);
var nextCnt = 0;
&
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
ÃÜÂëÒѾÊÇÎÒÃÇÉú»î¹¤×÷Öбز»¿ÉÉٵŤ¾ß,µ«Ò»¸ö²»°²È«µÄÃÜÂëÓÐÓÖÓпÉÄÜ»á¸øÎÒÃÇÔì³É²»±ØÒªµÄËðʧ¡£×÷ÎªÍøÕ¾Éè
¼ÆÕß,Èç¹ûÎÒÃÇÔÚÍøÒ³ÖÐÄܶÔÓû§ÊäÈëµÄÃÜÂë½øÐа²È«ÆÀ¹À,²¢ÏÔʾ³öÏàÓ¦µÄÌáʾÐÅÏ¢,ÄÇô¶ÔÓû§ÉèÖÃÒ»¸ö°²È«µÄÃÜÂë
½«Óкܴó°ïÖú¡£Í¬Ê±Ò²Ê¹µÃÍøÕ¾¸ü¾ßÈËÐÔ»¯,¸üÓÐÎüÒýÁ¦.
ʲôÊÇÒ»¸ö°²È«µÄÃÜÂëÄØ?±¾³ÌÐò°´ÒÔÏ ......
selected¿Ø¼þ£ºÔÚjsÖеÄÉèÖÃÊÇĬÈÏÊÇ selected=true
buttonºÍcheckboxµÄ¿ÉÓÃÐÔÉèÖ㺠disabled=true
textÎļþµÄÖ»¶ÁÊôÐÔ£ºreadOnly
ÔÚ´æÔÚIframeµÄʱºòÔÚÐèÒª¿ØÖÆÍⲿÊý¾ÝµÄʱºòÐèÒªÓõ½ parent
¶ÔÏóûÓÐlengthÊôÐÔ£¬Ö»ÓÐÊý×éÓÐlength³¤¶È
ÔÚjsÖпÉÒÔ¶Ô¶ÔÏóËæÒ⸳ÊôÐÔ£¬Èç¹û¸ÃÊôÐÔûÓÐÖµÔòΪundefined
sortArra ......
javascript»ñµÃÑ¡ÖÐÐÅÏ¢
filed in javascript post by onelong on2009-12-18 13:57 Friday
×î½üä¯ÀÀ±ðÈ˵IJ©¿Íʱ,¿´µ½±ðÈ˵Ļ®´ÊËÑË÷ºÜ¿É°®£¡Í»È»Áé»úÒ»¶¯£¬ÎÒÏëËûÊÇÔõÑù»ñÈ¡ÎÒÃǵÄÑ¡ÖеÄÎÄ×ÖÄØ£¿ÕâÑùµÄjavascript½»»¥ÕæµÄºÜÈËÐÔ»¯£¡
µ±È»»ñÈ¡Ò³ÃæÑ¡ÖеÄÄÚÈÝÔÚhtml±à¼Æ÷Ò²ÊǺܳ£Óõģ¡ÈçÒªÐÞ¸ÄijЩ×ÖÌ壬¾Í¿ÉÒÔÏÈÑ¡Ö ......
×ÖĸºÍÊý×Ö¼üµÄ¼üÂëÖµ(keyCode)
°´¼ü
¼üÂë
°´¼ü
¼üÂë
°´¼ü
¼üÂë
°´¼ü
¼üÂë
A
65
J
74
S
83
1
49
B
66
K
75
T
84
2
50
C
67
L
76
U
85
3
51
D
68
M
77
V
86
4
52
E
69
N
78
W
87
5
53
F
70
O
79
X
88
6
54
G
71
P
80
Y
89
7
55
H
72
Q
81
Z
90
8
......