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

javascript »ñÈ¡file±íµ¥È«Â·¾¶

ÔÚie6ÖжÔÓÚ<input type="file"
/>ͨ¹ýobj.valueÊÇ¿ÉÒÔ»ñÈ¡¿Í»§¶ËÑ¡ÔñÎļþµÄȫ·¾¶µÄ£¬µ«Êǵ½ie7¾ÍÖ»ÄÜ»ñÈ¡ÎļþÃû£¬Õâ¶ÔÓÚonchangeʼþÁ¢¼´ÏÔʾͼƬ»áÓÐÎÊÌ⣬¿ÉÒÔÓÃjs·½·¨½â¾ö
¾ßÌå´úÂëÈçÏ£º
<html>
    <head>
       
<title>get file input full path</title>
    <script
language='javascript'>
        function getFullPath(obj)
        {
            if(obj)
            {
                //ie
                if (window.navigator.userAgent.indexOf("MSIE")>=1)
                {
                    obj.select();
                    return document.selection.createRange().text;
                }
                //firefox
                else
if(window.navigator.userAgent.indexOf("Firefox")>=1)
                {
                    if(obj.files)
               


Ïà¹ØÎĵµ£º

javascript¼Ì³Ð

ÓÃcall·½·¨ÊµÏּ̳Ð
function classA(sColor){ 
       this.color=sColor; 
       this.sayColor=function(){ 
         alert(this.color); 
       ......

JavaScriptÌØЧ£ºÒ³ÃæÍ£Áôʱ¼ä

<script language="javascript" type="text/javascript">
var TempTime=new Date().getTime();
function StayTime(){
    var NowTime=new Date().getTime();
    var Time=NowTime-TempTime;
    var&nb ......

javaScript eval()º¯ÊýÓ÷¨

eval()º¯Êý
   
   JavaScriptÓÐÐí¶àСÇÏÃÅÀ´Ê¹±à³Ì¸ü¼ÓÈÝÒס£
   ÆäÖÐÖ®Ò»¾ÍÊÇeval()º¯Êý£¬Õâ¸öº¯Êý¿ÉÒÔ°ÑÒ»¸ö×Ö·û´®µ±×÷Ò»¸öJavaScript±í´ïʽһÑùÈ¥Ö´ÐÐËü¡£
   ¾Ù¸öСÀý×Ó£º
   
   var the_unevaled_answer = "2 + 3"; ......

javascriptµÄdomReady

»ù±¾ÉÏÿ¸ö¿â¶¼ÓÐÕⶫÎ÷£¬ÒòΪÈç¹ûÒª¶ÔÒ³ÃæÉϵÄÔªËؽøÐвÙ×÷£¬ÎÒÃDZØÐëµÈµ½Ò³Ãæ¼ÓÔØÁËÕâ¸öÔªËزÅÐУ¬·ñÔò»á±¨´í£¬µ«ÊÇÎÒÃǺÜÄÜÅж¨Ä³¸öÔªËØÊÇ·ñÒѼÓÔØ£¬µ«ÎÒÃÇ¿ÉÒÔÅж¨Ò³ÃæÊÇ·ñ¼ÓÔØ£¬Õâ¾ÍÊÇÎÒÃǾ­³£°Ñ´úÂë·Åµ½window.onload = function(){}Ö®ÖеÄÔµÓÉ¡£µ«window.onloadʼþÊÇ´ýµ½Ò³ÃæÉϵÄËùÓÐ×ÊÔ´±»¼ÓÔزż¤»î£¬Èç¹ûÒ³ÃæÉÏÓ ......

IEºÍFirefoxÔÚcss,JavaScript·½ÃæµÄ¼æÈÝÐÔ

1.document.formName.item("itemName") ÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
2.¼¯ºÏÀà¶ÔÏóÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃ() ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ