javascript¸øimage¿Ø¼þ¸³Öµ - .NET¼¼Êõ / ASP.NET
ÒªÇófileupload¸Ä±äºó£¬imageÖеÄͼÏñÒ²¸úןıä
<asp:Image ID="imgPublishArticle" runat="server" Height="200px" Width="155px" /><br />
<asp:FileUpload ID="fpImg" runat="server" Height="28px" onchange="test(a)" />
js´úÂ룺
<script language="javascript">
function test(a){
var aa=document.getElementById("imgPublishArticle");
alert(aa);
document.getElementById("imgPublishArticle").src=a.value;
//document.all.item("imgPublishArticle").src=a.value;
}
</script>
alert(aa)Êä³öÀ´µÄÊÇnull
·þÎñ¶Ë¿Ø¼þµ½Ç°Ì¨À´Ö®ºó£¬id¾Í±äÁË
ÄÇÔõô»ñµÃû±äÒÔÇ°µÄ£¿
¿´ÏÂÔËÐÐʱµÄÔ´ÎļþÀï¿Ø¼þµÄID£¬ÔÙÓÃdocument.getElementById("imgPublishArticle")
ºÙºÙ£¬°ï¸ö棬Ôõô¿´ÄØ£¿
ÓÒ»÷Ò³Ãæ ¡°²é¿´Ô´Îļþ¡±£¬#4·½·¨¿ÉÐÐ ÉèÖÃsrcÊôÐԾͿÉÒÔÁË¡£
Ïà¹ØÎÊ´ð£º
ÎÒÏëʵÏÖÒ»¸öЧ¹ûÊÇ£ºÄÜ°ÑÒ³Ãæ·Ö³É¼¸¸ö´ó¿é£¬µãÏ´ó¿éÉϵÄ+±ãÕ¹¿ª£¬µãÏÂ-±ãÕÛµþ¡£
Õâ¸öÓÐʲô¿Ø¼þ¿ÉÒÔÓò»£¬Çë¸ßÊÖ²»Áߴͽ̣¡
ÓÃjs´úÂëÀ´ ¿ØÖÆ divµÄ¶¯×÷´Ó¶øÄÜʵÏÖ
js¿ØÖÆdivÏÔʾ/Òþ²ØÁË
VS2008×Ô´ø·â×°Á ......
ÇóÒ»¸öjavascript½Å±¾..
µ±µã»÷Õâ¸ö<a>Ìí¼Ó¸½½ü</a>Á´½Óʱ¾Í»áÌí¼Ó¶àÒ»ÐÐÉÏ´«¿òºÍ°´Å¥,ºÍ×îºóÒ»¸öÅԱ߻áÏÔʾ"È¡Ïû"µÄÁ´½Ó,µã»÷Õâ¸öÈ¡Ïû¾Í»áÈ¥µô×îºóÒ»ÐÐ,Ò»¸öÕâ¸ö½Å±¾Ôõôд?Íò·Öлл..
Ò ......
ÔõÑù½«ASP³ÌÐòת»»Îª.NET³ÌÐò ?
ÕÒ¸öÈ«²Å·Òë¡£
ÊÖ¶¯È¥Ð´
¸Ð¾õд¹ýaspµÄ£¬À´Ð´asp.net£¬ÉÏÊÖÓ¦¸Ã¿ìµã¡£
¸üÄÜÀí½âasp.netµÄһЩÄÚ²¿¼¼Êõ
asp.net¶¼±»·â×°ÁË
ÎÒÊÇ×ö.NetµÄ£¬¶ÔASPһֱû½Ó´¥µ½£¬ºÜÄ°Éú¡£
¹« ......
ʹÓõÄÊÇ¿ò¼Ü×Ô´øµÄtreeview
°ó¶¨ÏÔʾ£¬Äܹ»°´ÕÕÕýÈ·µÄÐÎʽÏÔʾ³öÀ´
µ«Ò»µã»÷¾Í»á±¨´í
³ÌÐò¼¯¡°System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a¡±ÖеÄÀàÐÍ¡°System.Web.UI.WebCo ......
ÎÒÏëÎÊÒ»ÏÂÈçºÎÔÚ»ðºüÖйرգ¬·Ç½Å±¾´ò¿ªµÄÒ³Ã棬ºÃÏñwindow.close()²»¹ÜÓÃO(¡É_¡É)O~£¬
°Ù¶Èһϣ¬×Ô¼ºÊÔÊÔ
<script language="javascript" type="text/javascript">
& ......