Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚÒ³ÃæÉÏʹÓÃjavascriptµ÷ÓÃaspx.csºǫ́·½·¨

£¨Ò»£©aspxÒ³ÃæÉϵĴúÂëƬ¶Î
<body>
<script language="javascript" type="text/javascript">
    function DisplayBehindCode() {
    var text="<%=Name()%>";
    alert(text);
    }
</script>
....
<asp:Button ID="Button1" OnClientClick="DisplayBehindCode()" runat="server"  Text="Button" Visible="true" />
</body>
(¶þ)aspx.csºǫ́´úÂë
    public string Name()
    {
        string name = "canyong";
        return (name);
    }
´ø²ÎÊý°ì·¨
<body>
<script language="javascript" type="text/javascript">
    function DisplayBehindCode() { 
    var y="34";
        var x="56";
   
             var text='<%=Name("'+x+'","'+y+'")%>'; 
  alert(text);
   }
 public string Name(string strx,string stry)
         {
               string name = strx + "-555555--" + stry;
        return (name);
    }
</script>


Ïà¹ØÎĵµ£º

¡¾PB.NET±à³ÌϵÁÐ6¡¿ÀûÓÃJavaScript½øÐпͻ§¶Ë±à³Ì

¡¾PB.NET±à³ÌϵÁÐ6¡¿ÀûÓÃJavaScript½øÐпͻ§¶Ë±à³Ì
ÆÕͨWEB³ÌÐòÊÇÓÉä¯ÀÀÆ÷·¢³öÇëÇ󣬷þÎñÆ÷ÒÔHTMLÐÎʽ·µ»Ø½á¹û¡£Ò»°ãÇé¿öÏÂÎÒÃÇÔÚPBµÄʼþÀï±àдµÄÈκζԿͻ§¶ËʼþµÄÏìÓ¦´úÂ붼»á²úÉúÒ»´ÎÓë·þÎñÆ÷µÄ½»»¥¹ý³Ì£ºµ±Ò»¸ö¿Í»§¶Ëʼþ±»´¥·¢Ê±£¬JavaScriptÖÐÓÐÒ»¸ö¶ÔÓ¦µÄʼþÈ¥Ïò·þÎñÆ÷·¢ÆðÇëÇ󣬷þÎñÆ÷¶Ë»áµ÷ÓöÔӦʼþµÄ´úÂë² ......

javascript ÉèÖÃcookie×¢ÒâÊÂÏî

javascript ÉèÖÃcookie×¢ÒâÊÂÏî
javascript ÉèÖÃcookie×¢ÒâÊÂÏî
ÔÚJavascript ÖУ¬cookie ¿ÉÒÔͨ¹ý document.cookie½øÐÐÉèÖ㬵±ÉèÖöà¸öcookieʱä¯ÀÀÆ÷»á×Ô¶¯°Ñ
ËüÃÇÓ÷ֺŸô¿ª¡£ÈçÏ£º
document.cookie = 'cookie1';
document.cookie ='cookie2';
alert (document.cookie) ;//Êä³ö cookie1 ; cookie2
µ«ÊÇÈç¹û°ÑµÚ ......

javascriptÔÚ´«µÝurl£¨º¬ÓÐÖÐÎÄ£©Ê±³öÏÖÂÒÂë


´ó¼Ò¿ÉÄܶ¼Óöµ½¹ýÔÚдjavascirpt´úÂëʱ´«µÝÖÐÎÄ£¬ÔÚºǫ́ȡµ½Ê±·¢ÏÖÊÇÂÒÂ룬ÕâÀï°ÑÎÒ½ñÌì×öµÄ·½·¨Ð´³öÀ´£¬Ï£Íû¶Ô´ó¼ÒÒÔºóÓÐÓã¡
·½·¨£¨Ò»£©£º
htmlÒ³Ã棺
function testOne() {
   var url = "testOne_test.do?expr="+ÄãºÃ;
   location = encodeURI(url);
}
ºǫ́java´úÂ룺
String expr = ne ......

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

1. oncontextm ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectst> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3.  ²»×¼Õ³Ìù
4.   ·ÀÖ¹¸´ÖÆ
5. <link  > IEµØÖ·À¸Ç°»»³É×Ô¼ºµÄͼ±ê
6. <link   ......

javascript ÃæÏò¶ÔÏó±à³ÌµÄÆðµã

/*
* JavaScript¶ÔÏó¾ÍÊÇÒ»×éÊôÐÔ£¨·½·¨£©µÄ¼¯ºÏ
* ÔÚ¸ÃÓïÑÔÖÐÈç¹û±äÁ¿Ãû»ò·½·¨Ãû²»·ûºÏÉùÃ÷¹æ·¶£¬
* ÔòÒ»¶¨µÃÓ÷½À¨ºÅ“ [] ”ÒýÓÃËü
*
*/


/**
* <1.>¸ÃÓï¾äÉùÃ÷ÁËÒ»¸öclass1À࣬class1Ï൱ÓÚ¹¹Ôì·½·¨£¬Óֽй¹ÔìÆ÷
* Ò²¿É˵ÉùÃ÷ÁËÒ»¸öclass1·½·¨
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ