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

ÓÃJavascriptÁ¬½ÓAccessÊý¾Ý¿âµÄ·½·¨

±¾ÎĽéÉÜjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨¡£Õâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ¬ÔÚÏßÔòÐèÒª×ã¹»µÄȨÏÞ¡£ÓÉÓÚ²ÉÓÃAccessÊý¾Ý¿â£¬ËùÒÔ²¢²»Ê¹Óñê×¼µÄSQLÓ﷨ʹÓÃʱ¡£ÐèҪעÒâ¡£
Õ⼸Ìì·ÑÁËͦ´óÁ¦ÆøÔÚÍøÉϲéÕÒjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨£¬¾­¹ýÕûÀí×ܽᣬÖÕÓÚд³öÒ»¶ÎÄܹ»ÓÐЧִÐеĴúÂë¡£
µ«ÊÇÕâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ¬Ò»µ©·Åµ½Ãâ·Ñ¸öÈË¿Õ¼äÉϾÍû·¨Ö´ÐÐÁË£¬Ö÷ÒªÔ­Òò¾ÍÊDzÙ×÷ȨÏÞ²»¹»£¬ÓÉÓÚÖ»Ö§³Ö¾²Ì¬Ò³ÃæµÄÃâ·Ñ¿Õ¼ä¶àÊý¶¼
×÷Á˷dz£ÑϸñµÄÏÞÖÆ£¬ËùÒÔÎÞÂÛÊÇÓÃmdbµÄ·½Ê½£¬»¹ÊǶÁд´¿Îı¾ÎļþµÄ·½Ê½¶¼Ã»°ì·¨Í¨¹ý£¬¶øÓÉÒ³Ã汨³öjs´íÎó¡£¹úÍâµÄһЩÃâ·Ñ¿Õ¼ä£¬Ö±½Ó¾Í½ûÖ¹mdbÕâÑùÀ©Õ¹ÃûµÄÎļþÉÏ´«¡£
ËäȻûϣÍûÔÚ´¿¾²Ì¬Ò³ÃæµÄÃâ·Ñ¿Õ¼äÉÏ×÷×Ô¼ºµÄ¼ÆÊýÆ÷»òÊÇÁôÑ԰棬µ«ÊÇÕâ¶Î³ÌÐòÒ²Ðí»¹ÊǶÔһЩÅóÓÑÓÐÓô¦£¬Ð´³öÀ´¹©¸÷λÑо¿Ò»Ï¡£
Îļþ¹¹³É£º
AccessÊý¾Ý¿âÃûΪ MyData.Mdb£¬ ÀïÃ潨ÁËÒ»¸öÃûΪcountµÄ±í£¬±íÓÉÁ½¸ö ×Ö¶Î×é³É£º IDºÍCOUNT£¬±íÀïÓÐÒ»ÌõÊý¾Ý£º ('count','100')¡£
Îı¾ÎļþÃûΪ count.txt£¬ÀïÃæËæ±ãдÈëÒ»¸öÊý×Ö¡£
¾²Ì¬Ò³ÃæÃûΪCnt.htm¡£
ÒÔÉÏ3¸öÎļþ¶¼·ÅÔÚͬһĿ¼Ï¡£
ÓÉÓÚ²ÉÓÃAccessÊý¾Ý¿â£¬¶øËü²ÉÓ÷DZê×¼SQLÓï·¨£¬ËùÒÔҪעÒâÔÚ±íÃûºÍ×Ö¶ÎÃûÉÏÐèÒª¼Ó·½À¨ºÅ£º []
ÏÂÃæÊÇÒ³ÃæÀïµÄ´úÂ룺ÆäÖÐgetCountfromDB·½·¨ÊǶÔAccessÊý¾Ý¿â½øÐвÙ×÷£¬getCountfromTxt·½·¨ÊǶÔtxt´¿Îı¾½øÐвÙ×÷£¬ÕâÁ½¸ö·½·¨¶¼ÔÚ±¾µØÖ´ÐÐͨ¹ý¡£
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <SCRIPT LANGUAGE="JavaScript"> <!-- function getCountfromDB() { //ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£ var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm")); var path = filePath + "MyData.mdb"; //È¥µô×Ö·û´®ÖÐ×îÇ°ÃæµÄ"files://"Õâ8¸ö×Ö·û¡£ pathpath = path.substring(8); var updateCnt = 0; //Éú³É²éѯºÍ¸üÐÂÓõÄsqlÓï¾ä¡£ var sqlSelCnt = "SELECT COUNT from [COUNT] WHERE ID = 'count'"; var sqlUpdCnt = "UPDATE [COUNT] SET [COUNT] = '"; //½¨Á¢Á¬½Ó£¬²¢É


Ïà¹ØÎĵµ£º

ÓÐ¹Ø JavaScript µÄ 10 ¼þÈÃÈ˷ѽâµÄÊÂÇé

JavaScript ¿ÉËãÊÇÊÀ½çÉÏ×îÁ÷Ðеıà³ÌÓïÑÔ£¬ËüÔø±» Web ¿ª·¢Éè¼ÆʦÌùÉÏجÃεıêÇ©£¬ËäÈ»ÕæÕýµÄجÃÎÆäʵÊÇ DOM
API£¬Õâ¸ö±»´óÁ¿µÄ¿ª·¢ÓëÉè¼ÆʦËæÊÖÄéÀ´ÔöÇ¿ËûÃÇµÄ Web Ç°¶ËµÄ½Å±¾ÓïÑÔ£¬Èç½ñÔ½À´Ô½±»ÖØÊÓ£¬ËäÔòÈç´Ë£¬JavaScript
ÈÔȻӵÓкܶàÈÃÈ˷ѽâµÄ¶«Î÷¡£
1. ËüÒÔ Java ÃüÃû£¬µ«²¢²»ÊÇ Java
Ëü×î³õ½Ð Mocha£¬ ½ÓןÄà ......

Javascript: onresize

ä¯ÀÀÆ÷£ºIE 8¡¢FF 3.6¡¢Chrome 4.0¡¢Safari 4.0¡¢Opera 10.1
½öÓÐIEä¯ÀÀÆ÷Ö§³ÖHTMLElement.onresize£¨±ÈÈçbody.onresize£©
ÆäËüä¯ÀÀÆ÷Ö»Ö§³Öwindow.onresize
ÏÈ˵IEµÄHTMLElement.onresize
ʹÓÃÇ°ÇëÈ·¶¨ÄãµÄÐÄÔ༰ѪѹÕý³££¬Èç¹ûÄ㶨ÒåÁË
body.onresize = function(){……}»òÕßhtml.onresize = obj.fun;
......

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


javascript²¶»ñ´°¿Ú¹Ø±ÕʼþÓÐÁ½ÖÖ·½·¨
1.ÓÃjavascriptÖØж¨Òå window.onbeforeunload()  ʼþ
ÔÚjavascriptÀﶨÒåÒ»¸öº¯Êý¼´¿É
function  window.onbeforeunload()  {  alert("¹Ø±Õ´°¿Ú")}
alert()ʼþ½«»áÔڹرմ°¿ÚÇ°Ö´ÐУ¬ÄãÒ²¿ÉÒÔÓû§¾ö¶¨ÊÇ·ñ¹Ø±Õ´°¿Ú
function  window.o ......

javascript ģʽ¶Ô»°¿òʹÓ㨼Ǽ±¸²é£©

JavascriptÀïÃæ·Öģʽ¶Ô»°¿òºÍ·Çģʽ¶Ô»°¿ò£¬ÆäʵÁ½ÕßÇø±ð¾ÍÊÇÔÚ¶Ô»°¿ò±»¹Ø±Õ֮ǰÓû§ÄÜ·ñÔÚͬһҳÃæµÄÆäËûµØ·½½øÐй¤×÷¡£±ÈÈç“´ò¿ªÎļþ”¶Ô»°¿ò±ãÊǵäÐ͵Äģʽ¶Ô»°¿ò£¬ÔÚÄã¶ÔÕâ¸ö¶Ô»°¿ò×ö³ö¶¯×÷²ÅÄܶԴò¿ª¸Ã¶Ô»°¿òµÄ³ÌÐò½øÐÐÆäËû²Ù×÷£¬¶ø·Çģʽ¶Ô»°¿òÔò²»±Ø¡£
ģʽ¶Ô»°¿ò£ºshowModalDialog
·Çģʽ¶Ô»°¿ò£ºsho ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ