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
Ïà¹ØÎĵµ£º
×¢£º http://www.java114.com/277/content4355.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> upload </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME ......
var docEle = function() {
return document.getElementById(arguments[0]) || false;
}
function cloDiv(){
var overlayID="overlay";
var msgID = "overlayMsg";
document.body.removeChild(docEle(overlayID));
document.body.removeChild(docEle(msgID));
}
function openNewDiv() {
......
ÓÃJavaScriptÒþ²Ø¿Ø¼þµÄ·½·¨ÓÐÁ½ÖÖ£¬·Ö±ðÊÇͨ¹ýÉèÖÿؼþµÄstyleµÄ“display”ºÍ“visibility”ÊôÐÔ¡£µ±style.display="block"»òstyle.visibility="visible"ʱ¿Ø¼þ»ò¼û£¬µ±style.display = "none"»òstyle.visibility = "hidden"ʱ¿Ø¼þ²»¿É¼û¡£²»Í¬µÄÊÇ“display”²»µ«Òþ²Ø¿Ø¼þ£¬¶øÇÒ±»Òþ²ØµÄ¿ ......
parseFloat ת»»³É¸¡µãÊý
parseInt ת»»³ÉÕûÊý.
ÕâÁ½¸öº¯Êý¶¼ÓÐЩÈÝ´íÐÔµÄ,±ÈÈç"123abc"»á±ä³É123.
Èç¹ûÂ¥Ö÷Ï£Íû¸ü׼ȷһЩ,Æäʵ¿ÉÒÔÅжÏÒ»ÏÂ,È»ºóÓÃeval,ÏñÕâÑù
²»¹ýÒ²¿ÉÒÔʹÓÃÕâÑùµÄ·½·¨:
var a = "234" ;
a = a.replace(/(^[\\s]*)|([\\s]*$)/g, "");
if( a !="" && !isNaN( a ) )
{//Èç¹ûÊÇÊý×Ö
a = e ......