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;
&
Ïà¹ØÎĵµ£º
JavascriptµÄEvent¶ÔÏóÓÃÀ´ÃèÊöJavascriptµÄʼþ£¬ËüÖ÷Òª×÷ÓÃÓÚIE4ºÍNN4ÒÔºóµÄ¸÷¸öä¯ÀÀÆ÷°æ±¾ÖС£
Event´ú±íʼþ״̬£¬Èçʼþ·¢ÉúµÄÔªËØ£¬¼üÅÌ״̬£¬Êó±êλÖúÍÊó±ê°´Å¥×´Ì¬¡£Ò»µ©Ê¼þ·¢Éú,±ã»áÉú³ÉEvent¶ÔÏó£¬Èçµ¥»÷Ò»¸ö°´Å¥£¬ä¯ÀÀÆ÷µÄÄÚ´æÖоͲúÉúÏàÓ¦µÄ event¶ÔÏó¡£
IE¶ÔʼþµÄÒýÓÃ
ÔÚIE4ÒÔÉÏ°æ±¾ÖУ¬event¶ÔÏó×÷Î ......
from http://news.csdn.net/a/20100424/218105.html
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
......
ÔÚJavaScriptÖÐ×Ö·û´®×éºÏÏà¼Ó£¬´ó¼ÒÒ»°ãÖ±½ÓÓÃ+Æ´½ÓÆðÀ´.ÀýÈç:
for(i=0; i<len; i++){
if(zdname != ""){
zdname += "#" + trNode.children.item(i).getAttribute("busPath");
}else{
zdname = trNode.children.item(i).getAttribute("busPath");
  ......
ruby³£¹æ·ÃÎÊaccessÊý¾Ý¿âµÄ·½·¨Ó¦¸ÃÊÇʹÓÃDBI¿â
£º
require 'dbi'
DBI.connect("DBI:ADO:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;")
¿ÉÊÇ
¼òµ¥³¢ÊÔÖ®ºóûÄܳɹ¦£¬ÌáʾÕÒ²»µ½Çý¶¯Æ÷ADO,ÀÁµÃÔÙÊÔ£¬ËìÕÒÆäËû·½·¨¡£
Ò»·¬ËÑË÷Ö®ºó£¬·¢ÏÖ¿ÉÒÔÓÃWIN32OLEÀ´·ÃÎÊaccess,дһ¸ö¼òµ¥µÄÀà°ü×°Ö®:
......
var arr=['a','b','c'];
¡¡¡¡ÈôҪɾ³ýÆäÖеÄ'b',ÓÐÁ½ÖÖ·½·¨£º
¡¡¡¡1.delete·½·¨:delete arr[1]
¡¡¡¡ÕâÖÖ·½Ê½Êý×鳤¶È²»±ä,´Ëʱarr[1]±äΪundefinedÁË,µ«ÊÇÒ²Óкô¦ÔÀ´Êý×éµÄË÷ÒýÒ²±£³Ö²»±ä,´ËʱҪ±éÀúÊý×éÔªËØ¿ÉÒÔ²ÅÓÃ
¡¡¡¡for(index in arr)& ......