Õâ¶Î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
Ïà¹ØÎÊ´ð£º
ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒÆ¶¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒÆ³ýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬
HTML code:
<html>
<head>
<meta http-equiv= ......
Èý¸öÊýx,y,z ±È´óС..
var x,y,z,t;
if (x>y)
{t=x;x=y;y=t;} //½»»»x,yµÄÖµ
if(x>z)
{t=z;z=x;x=t;}//½»»»x,zµÄÖµ
if(y>z)
{t=y;y=z;z=t;}//½»»»z,yµÄÖµ
ÕâÊÇ ......
DataSetµ¼³öxml Åú´¦Àí(Ñ»·)µÃÔõô´¦Àí
XMLÎļþ
<A>
<B>
<C>
</C>
&nb ......
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......