JavaScriptÑéÖ¤ÉÏ´«Îļþ¸ñʽ¼°´óС
ÔÚÉÏ´«²Ù×÷ÖУ¬¾³£»áÓöµ½ÒªÇóÖ¸¶¨ÉÏ´«ÎļþµÄ¸ñʽ£¬ÏÂÃæµÄʵÀýÊÇÔÚ¿Í»§¶Ëͨ¹ýJavaScriptÑéÖ¤ÉÏ´«Í¼Æ¬¸ñʽΪjpg/gif/png
<html>
<head>
<mce:script language="JavaScript" type="text/JavaScript"><!--
var img=null;
function checkPic(picForm){
var location=picForm.pic.value;
if(location==""){
alert("ÇëÏÈÑ¡ÔñͼƬÎļþ");
return false;
}
var point = location.lastIndexOf(".");
var type = location.substr(point);
if(type==".jpg"||type==".gif"||type==".JPG"||type==".GIF"||type==".PNG"||type==".png"){
img=document.createElement("img");
img.src=location;
if(img.fileSize>102400){
alert("ͼƬ³ß´çÇë²»Òª´óÓÚ100KB");
return false;
}else
return true;
}
else{
alert("Ö»ÄÜÊäÈëjpg»òÕßgif¸ñʽµÄͼƬ");
return false;
}
return true;
}
function changesrc(){
yourpic.src=picForm.pic.value;
}
// --></mce:script>
</head>
<body>
<table width="100%" border="0">
<tr>
<td>
<div align="center"><img border="1" id="yourpic"
onload="javascript:if(this.width>175)this.width=175;if(this.height>150)this.height=150;">
</div>
</td>
</tr>
<form name="picForm" action="#" method="post"
enctype="multipart/form-data" onsubmit="return checkPic(picForm);">
<tr>
<td>
<div align="center"><input type="file" name="file" size="10"
id="pic" onchange="changesrc()"/></div>
</td>
</tr>
<tr>
<td>
<div align="center"><input type="submit" value="ÉÏ´«ÕÕÆ¬" /></div>
</td>
</tr>
</table>
</body>
</html>
ÕâÖÖÅжÏÖ»ÊÇÒ»¸ö³õ²½µÄÅжϣ¬µ±ÉÏ´«ÎļþΪÐ޸ĸñʽµÄÇ
Ïà¹ØÎĵµ£º
ÔÎijö´¦: http://www.dnew.cn/post/196.htm
ÏÈ¿´ÏÂÏÂÃæ¼¸ÖÖд·¨
1.function f(x){return x*x;};f(x);
2.(function(x){return x*x;})(x);
3.(function(x){return x*x;}(x));
µÚÒ»ÖÖÎÒÃÇÓ¦¸Ã¶¼ºÜÊìϤÁË£¬ÕâÊÇÎÒÃǾ³£Ê¹ÓõÄд·¨¡£µÚ¶þµÚÈýÖÖ¶¼ÊÇÄäÃûº¯ÊýµÄд·¨¡£
------------------------------------------------ ......
Evaluates an expression after a specified number of milliseconds has elapsed.
(ÔÚÖ¸¶¨Ê±¼ä¹ýºóÖ´ÐÐÖ¸¶¨µÄ±í´ïʽ)
Syntax:
iTimerID = window.setTimeout(vCode, iMilliSeconds [, sLanguage])
Parameters
vCode
Required. Variant that specifies the function pointer or string that indicates the code to be ......
10¸öÓÅÐãµÄAjaxºÍJavascript¹úÍâ×ÊÔ´ÍøÕ¾
×ªÔØµØÖ·£ºhttp://www.zzsky.cn/build/content/1246.htm
1¡¢Ajax Rain: http://www.ajaxrain.com
¡¡¡¡AjaxRainÓкܶàÍêÃÀÕûºÏAjax¡¢CSS¡¢DHTML»òJavascriptµÄʵÀý£¬ÓÐһЩDemoµÄÈ·ÖµµÃÄãÈ¥¿´Ò»¿´£¬¼´Ê¹Äã²»ÊÇÍøÒ³Éè¼Æ£¨¿ª·¢£©Ê¦¡ ......
Ò»¡¢½¨Á¢ÍøÒ³
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<script language="javascript" type="text/javascript">
<!-- Ìṩ¸øC#³ÌÐòµ÷Óõķ½·¨ -->
function messageBox(message)
{
alert(message);
}
</script>
</head>
& ......
Òý×Ó
±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂÆµÄ¾À²øÖгÊÏÖ³öÎÞÏÞµÄÉú»úºÍ»îÁ¦¡£
Êý¾ÝÌìÉú¾ÍÊÇÎľ²µÄ£¬×ÜÏë±£³Ö×Ô¼º¹ÌÓеı¾É«£»¶ø´úÂëÈ´ÌìÉú»îÆÃ£¬×ÜÏë¸Ä±äÕâ¸öÊÀ½ç¡£
Äã¿´£¬Êý¾Ý´úÂë¼äµÄ¹ØÏµÓëÎïÖÊÄÜÁ¿¼äµÄ¹Ø ......