Õâ¶ÎJavaScript´úÂëΪʲôÎÞ·¨Ö´ÐÐ - .NET¼¼Êõ / C#
ÒÔÏÂÊÇÒ»¶ÎJavsScript½Å±¾£¬µ«ÔËÐÐʱ×Ü»á²úÉú ¡°Microsoft JScript ÔËÐÐʱ´íÎó: 'null' Ϊ¿Õ»ò²»ÊǶÔÏó¡±Òì³££¬´ó¼Ò°ï¿´Ò»Ï¡£
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server" Text =""></asp:TextBox>
<script id="scr1" type ="text/javascript" >
function getValue() {
var x = document.getElementById("Text1");
alert (x.getAttribute("Text"))
}
</script>
<input id="Button1" type="button" value="button" onclick ="getValue()"
<asp:TextBox ID="TextBox1" runat="server" Text =""> </asp:TextBox>
<script id="scr1" type ="text/javascript" >
function getValue() {
var x = document.getElementById("<%= TextBox1.ClientID %>");
alert (x.getAttribute("value"))
}
</script>
<input id="Button1" type="button" value="button" onclick ="getValue()"
document.getElementById("TextBox1");
»òdocument.getEl
Ïà¹ØÎÊ´ð£º
ÎÒÔÚºǫ́µ÷ÓÃJavaScriptµÄʱºò£¬ËûÊÇÔÚºǫ́°ÑʼþµÄ´úÂëÖ´ÐÐÒ»´ÎºóÔÚÖ´ÐÐJavaScript·½·¨
ÓÐʲô°ì·¨ ÔÚÖ´ÐÐJavaScript·½·¨µÄʱºòͣס£¬ÔÚÖ´ÐкóÃæµÄ´úÂë
²»Ì«Ã÷°×°¡£¬ËµÇå³þµã°É
¾ÍÊÇÖ´Ðкǫ́´úÂëµÄʱºò ......
×î½üÔÚ×ö¸öÍøÉÏÉ̳ǣ¬¹ºÎﳵģ¿é£¬Ã»ÓÐ×ö¹ý£¬Âé·³¸÷λ°ïæ˵Ï´óÖÂ˵ÏÂ˼·£¬ÄÜ·¢Ò»·ÝÔ´Âë¸üºÃ¡£Ð¡µÜÏÈл¹ý¸÷λÁË£»
QQ£º413763818£»
eamil:swebook@126.com
ÍøÉÏÒ»´ó¶Ñ£¡
www.51aspx.com
ȥϠ......
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......
ÎÒµÄÔ´ÎļþÈçÏ£º
<html>
<head> <title>show picture </title>
<script>
function change(fileName)
{
  ......
ÎÒÔÚform1ÖеÄij¸ö·½·¨ÈÃform2´°Ìå³öÏÖ
ÄÇôÕâ¸öʱºòÔõô¹Ø±Õform1¶ø²»¹Ø±Õform2ÄØ£¿
Form2 f=new Form2();
f.Show();
this.Close();
ÒýÓÃ
Form2 f=new Form2();
f.Show();
this.Close();
ÕâÑùµÄ»°Õû¸ö³Ì ......