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

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 => ShowModalDialogº¯ÊýµÄ¹¦ÄÜ

ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º

´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄÜ
²Ù×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [,
vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL

±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´ ......

javascript»ñµÃÑ¡ÖÐÐÅÏ¢


javascript»ñµÃÑ¡ÖÐÐÅÏ¢
filed in javascript post by onelong on2009-12-18 13:57 Friday
×î½üä¯ÀÀ±ðÈ˵IJ©¿Íʱ,¿´µ½±ðÈ˵Ļ®´ÊËÑË÷ºÜ¿É°®£¡Í»È»Áé»úÒ»¶¯£¬ÎÒÏëËûÊÇÔõÑù»ñÈ¡ÎÒÃǵÄÑ¡ÖеÄÎÄ×ÖÄØ£¿ÕâÑùµÄjavascript½»»¥ÕæµÄºÜÈËÐÔ»¯£¡
µ±È»»ñÈ¡Ò³ÃæÑ¡ÖеÄÄÚÈÝÔÚhtml±à¼­Æ÷Ò²ÊǺܳ£Óõģ¡ÈçÒªÐÞ¸ÄijЩ×ÖÌ壬¾Í¿ÉÒÔÏÈÑ¡Ö ......

JavaScript³õѧÕßÖ¸ÄÏ

 
±¾ÎÄÒë×Ô£ºhttp://www.codeproject.com/KB/scripting/jsbeginner.aspx
Ô­ÎÄ£ºJavaScript For Beginners
ÊÊÒ˶ÔÏó£ºJavaScript³õѧÕß¡£
 
Ŀ¼£º
 
°üº¬ÓëÒýÈë(Embedding,including)
write ºÍ writeln
Îĵµ¶ÔÏó£¨document object£©
bgColor ºÍ fgColor
ÏûÏ¢¿ò£¨Message Box£©
±äÁ¿£¨Variables ......

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");
  ......

JavaScript²¶»ñ´°¿Ú¹Ø±Õʼþ

JavaScript²¶»ñ´°¿Ú¹Ø±Õʼþ
¹Ø¼ü×Ö: window.closeʼþ
javascript²¶»ñ´°¿Ú¹Ø±ÕʼþÓÐÁ½ÖÖ·½·¨
1.ÓÃjavascriptÖØж¨Òå window.onbeforeunload()  ʼþ
ÔÚjavascriptÀﶨÒåÒ»¸öº¯Êý¼´¿É
function  window.onbeforeunload()  {  alert("¹Ø±Õ´°¿Ú")}
alert()ʼþ½«»áÔڹرմ°¿ÚÇ°Ö´ÐУ¬ÄãÒ²¿ÉÒÔÓà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ