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

javascript½ØÈ¡Â·¾¶ÖеÄÎļþÃû

<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="Keywords" content="¼òµ¥µÄXHTMLÒ³Ãæ" />
    <meta name="Description" content="ÕâÊÇÒ»¸ö¼òµ¥µÄXHTMLÒ³Ãæ" />
    <title>¼òµ¥µÄXHTMLÒ³Ãæ</title>
</head>
<body>
<script   language="javascript">   
  function   test(){   
  var   str1=document.Form1.fileFile1.value;   
  var   regstr=/\\/;   
  var   regresult=new   RegExp(regstr)   
  var   sss=str1.split(regresult,'100');   
  var   need=sss[sss.length-1];   
  var   a=need.split('.');   
  document.Form1.txtText2.value=a[0];   
  document.Form1.txtText3.value=a[1];   
  }   
    
  </script>   
  <body>   
  <form   name=Form1>   
  File   Input:<input   name=fileFile1   type=file><br>   
    
  Text1:<input   name=txtText1   type="text"     size=60><br>   
  Text2:<input  


Ïà¹ØÎĵµ£º

JavaScript»ù±¾ÔªËØ

1.Text µ¥Ðе¥ÁÐÊäÈëÔªËØ
          ¹¦ÄÜ£º¶ÔText±êʶÖеÄÔªËØÊµÊ©ÓÐЧµÄ¿ØÖÆ
          »ù±¾ÊôÐÔ£º
                Name£ºÉ趨Ìá½»ÐÅÏ ......

ʹÓÃjavascript´ò¿ªÄ£Ì¬¶Ô»°¿ò

1. ±ê×¼µÄ·½·¨
<mce:script type="text/javascript"><!--

function openWin(src, width, height, showScroll){
window.showModalDialog (src,"","location:No;status:No;help:No;dialogWidth:"+width+";dialogHeight:"+height+";scroll:"+showScroll+";");
}
// --></mce:script> &n ......

IEºÍFirefoxÔÚ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ÏÂ,¿ÉÒÔ ......

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ÏÂ,¿ÉÒÔʹÓÃ() ......

Javascript²Ù×÷select¿Ø¼þ´óÈ«

1ÅжÏselectÑ¡ÏîÖРÊÇ·ñ´æÔÚValue="paraValue"µÄItem 
 2ÏòselectÑ¡ÏîÖР¼ÓÈëÒ»¸öItem 
 3´ÓselectÑ¡ÏîÖРɾ³ýÒ»¸öItem 
 4ɾ³ýselectÖÐÑ¡ÖеÄÏî 
 5ÐÞ¸ÄselectÑ¡ÏîÖРvalue="paraValue"µÄtextΪ"paraText" 
 6ÉèÖÃselectÖÐtext="paraText"µÄµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ