ÀûÓÃJavaScriptʵÏÖÉÏ´«Í¼Æ¬Ô¤ÀÀ
<script >
function showimage()
{
//IMG1ΪͼƬ¿Ø¼þ»òDiv,File1ΪÉÏ´«Îļþ¿Ø¼þ
document.getElementById("IMG1"). src = document.getElementById("File1").value;
}
</script >
¿Ø¼þÖÐÒýÓÃ:
<input id="File1" runat="server" type="file" onchange="showimage()"/>
IE7.0ÖÐÓÉÓÚ²»Ö§³Ö¾ø¶Ô·¾¶,»á³öÏÖͼƬÏÔʾ´íÎó.½â¾ö°ì·¨:
<script >
function showimage()
{
document.getElementById("IMG1").filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src =
document.getElementById ("File1").value;
}
</script >
¿Ø¼þÖÐÒýÓÃ:
<input id="File1" runat="server" type="file" onchange="showimage()"/>
ÁíÍâÐèÔÚIMG»òDIVÑùʽÖÐÐÞ¸Ä:
<div id="IMG1" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);width:400px;height:200px;" runat="server" src="" /></div>
Ïà¹ØÎĵµ£º
prototype ÊÇÔÚ IE 4 ¼°ÆäÒÔºó°æ±¾ÒýÈëµÄÒ»¸öÕë¶ÔÓÚijһÀàµÄ¶ÔÏóµÄ·½·¨£¬¶øÇÒÌØÊâµÄµØ·½±ãÔÚÓÚ£ºËüÊÇÒ»¸ö¸øÀàµÄ¶ÔÏóÌí¼Ó·½·¨µÄ·½·¨£¡ÕâÒ»µã¿ÉÄÜÌýÆðÀ´»áÓеãÂÒ£¬±ð¼±£¬ÏÂÃæÎÒ±ãͨ¹ýʵÀý¶ÔÕâÒ»ÌØÊâµÄ·½·¨×÷ÒÑϽ²½â£º
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÒªÏÈÁ˽âÒ»ÏÂÀàµÄ¸ÅÄJavaScript ±¾ÉíÊÇÒ»ÖÖÃæÏò¶ÔÏóµÄÓïÑÔ£¬ËüËùÉæ¼°µÄÔªËظù¾ÝÆäÊôÐÔµ ......
JavaScript¶¯Ì¬¼ÓÔØCSSµÄÈýÖÖ·½·¨ ÊÕ²Ø
Èç¹ûÄãÓкܶà¹ØÁªµÄCSSÎļþÒªÒ»Æð¼ÓÔØ£¬»òÕßÏ붯̬µÄ¼ÓÔز»Í¬µÄCSSÎļþ£¬ÄÇôÏÂÃæµÄ·½·¨ÄãÒ»¶¨¶ÔÄãÓаïÖú¡£
µÚÒ»ÖÖ£ºÒ»°ãÓÃÔÚÍⲿCSSÎļþÖмÓÔرØÐëµÄÎļþ
³ÌÐò´úÂë
@import url(style.css);
/*Ö»ÄÜÓÃÔÚCSSÎļþÖлòÕßstyle±êÇ©ÖÐ*/
µÚ¶þÖÖ£º¼òµ¥µÄÔÚÒ³ÃæÖмÓÔØÒ» ......
(Ò»).È·ÈÏɾ³ýÓ÷¨:
1. BtnDel.Attributes.Add("onclick","return confirm('"+"È·ÈÏɾ³ý?"+"')");
2. linktempDelete.Attributes["onclick"]="javascript:return confirm('"+"È·ÈÏɾ³ý?"+"');";
3. privat ......
String.prototype.Trim=function(){
returnthis.replace(/(^\s*)|(\s*$)/g,"");
}
String.prototype.LTrim=function(){
returnthis.replace(/(^\s*)/g,"");
}
String.prototype.RTrim=function(){
returnthis.replace(/(\s*$)/g,"");
} ......
function checkImgAddr(url){
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("post",url,false);
xmlhttp.send();
if(xmlhttp.readyState==4){
if(xmlhttp.status==404){
return "File Not Exist.";
}else if(xmlhttp.status == 200){
re ......