JavaScript_»ñÈ¡Îļþ´óС
ºÜ¶àÇé¿öÏ£¬ÎÒÃÇÒªÔÚ·¢Ë͵½ºǫ́´¦ÀíÇ°£¬ÅжÏÒ»ÏÂËùÉÏ´«µÄÎļþÊDz»ÊÇ·ûºÏ´óСҪÇó£¬Æäʵ½Å±¾¿ÉÒԺܷ½±ãµÄ°ïÖúÎÒÃÇʵÏÖ£¬´úÂëÈçÏÂ
<html>
<head>
<title>JavaScript_»ñÈ¡Îļþ´óС_°¢·½Ë÷</title>
</head>
<body>
<input type="file" name="file1" id="file1" size="40" onchange="changeSrc(this)"/>
<img src="about:blank" mce_src="about:blank" id="fileChecker" alt="test" width="100" style="display:none" mce_style="display:none"
/>
<span id="showSize"></span>
</body>
</html>
<!--////ÒÔÏ´úÂë·Åµ½Ò³Ãæ×îºóÃæ-->
<mce:script type="text/javascript"><!--
var oFileChecker = document.getElementById("fileChecker");
function changeSrc(filePicker)
{
oFileChecker.src = filePicker.value;//¶ÁͼƬ
}
//ÅжÏÊÇ·ñÍêÈ«¶ÁÍê
oFileChecker.onreadystatechange = function ()
{
if (oFileChecker.readyState == "complete")
{
checkSize();
}
}
function checkSize()
{
var limit = 2 * 1024 * 1024;
var show = document.getElementById("showSize");
if (oFileChecker.fileSize > limit)
{
oFileChecker.style.display = 'none';
show.innerHTML = parseInt(oFileChecker.fileSize/1024) + "KB[" +
oFileChecker.fileSize + "×Ö½Ú] <font color='red'>* ¸½¼þ²»ÄÜ´óС²»Äܳ¬¹ý
<b>" + limit/1024 + "</b> KB</font>";
}
else
{
oFileChecker.style.display = '';
show.innerHTML = parseInt(oFileChecker.fileSize/1024) + "KB[" +
oFileChecker.fileSize + "×Ö½Ú] <font color='green'>´óСÕý³£</font>";
}
}
// --></mce:script>
Ïà¹ØÎĵµ£º
Ê×ÏÈÔÚbodyÖмÓÈëÒÔÏÂHTMLÄÚÈÝ£º
<div id="panel">
<div id="top">
<ul id="menu">
<li id="1">Home</li>
&nbs ......
Ñ¡ÔñÔªËØ£ºdocument.getElementsByTagName£¬document.getElementsById,document.getElementsByName¡£
firstChild,lastChild,nextSibling£¬previousSibling
´´½¨ÔªËØ£ºdocument.createElement(),appendChild();
ɾ³ýÔªËØ£ºremoveC ......
֮ǰ¿´ÁËÓйØÄäÃûº¯ÊýµÄµ÷Ó㬸оõÓбØÒªºÍ´ó¼Ò·ÖÏíһϡ£
¹ØÓÚʲôÊÇÄäÃûº¯Êý£¬¼°Ëü´øÀ´µÄÓÅÊÆÔÚ±¾ÎľͲ»ÉÁË£¬ÏÈÅ׳öÒ»¸ö³£ÓõÄÄäÃûº¯Êý£º
(function(){alert('yo')})()
ºÜ¶àͬѧ֪µÀÔõôÓÃÕâÖÖÄäÃûº¯Êý£¬È´»òÐí²¢²»Ã÷°×ΪʲôÕâÑùд¾ÍÄܹ»µ÷ÓÃÄäÃûº¯Êý¡£Ò²ÐíÖªµÀºóÃæµÄÔ²À¨ºÅÊÇÖ´ÐÐÇ°ÃæµÄº¯Êý£¬¶ø²¢²»Çå³þÇ°ÃæµÄÔ² ......
Ïȸø³ö»ù±¾µÄHTMLÎļþ£º
<ul>
<li id="m01"></li>
<li id="m01"></li>
<li id="m01"></li>
</ul>
<div>
<div id="C01"> </div>
<div id="C02">&n ......
±¾ÎĽéÉÜjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨¡£Õâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ¬ÔÚÏßÔòÐèÒª×ã¹»µÄȨÏÞ¡£ÓÉÓÚ²ÉÓÃAccessÊý¾Ý¿â£¬ËùÒÔ²¢²»Ê¹Óñê×¼µÄSQLÓ﷨ʹÓÃʱ¡£ÐèҪעÒâ¡£
Õ⼸Ìì·ÑÁËͦ´óÁ¦ÆøÔÚÍøÉϲéÕÒjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨£¬¾¹ýÕûÀí×ܽᣬÖÕÓÚд³öÒ»¶ÎÄܹ»ÓÐЧִÐеĴúÂë¡£
µ«ÊÇÕâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ ......