C#: ÌáÈ¡ÍøÒ³ÖеÄjavascript´úÂë
public static void Main()
{
WebRequest req = WebRequest.Create("http://blog.csdn.net/xiaofengsheng");
try
{
WebResponse result = req.GetResponse();
Stream ReceiveStream = result.GetResponseStream();
StreamReader readerOfStream = new StreamReader(ReceiveStream,
System.Text.Encoding.GetEncoding("UTF-8"));
string temp = readerOfStream.ReadToEnd();
Regex ex = new Regex(
"<script.+?type ?= ?(\"|')text/javascript(\"|')>.*?</script>",
RegexOptions.Singleline);
MatchCollection mc = ex.Matches(temp);
foreach (Match m in mc)
{
Console.WriteLin
Ïà¹ØÎĵµ£º
The C# classes that you design will be used by code that you write and possibly by code that
other people write. Your C# classes may be used by a VB.NET application or from within an
ASP.NET page. Moreover, your classes may very well be used alongside other classes
designed by other .NET develope ......
#(¶Á×ö "C sharp")ÊÇ΢Èí¹«Ë¾ÔÚÈ¥ÄêÁùÔ·¢²¼µÄÒ»ÖÖеıà³ÌÓïÑÔ,²¢¶¨ÓÚÔÚ΢ÈíÖ°Òµ¿ª·¢ÕßÂÛ̳(PDC)ÉϵÇ̨ÁÁÏà.C#ÊÇ΢Èí¹«Ë¾Ñо¿Ô±Anders HejlsbergµÄ×îгɹû.C#¿´ÆðÀ´ÓëJavaÓÐמªÈ˵ÄÏàËÆ;Ëü°üÀ¨ÁËÖîÈçµ¥Ò»¼Ì³Ð,½çÃæ,ÓëJava¼¸ºõͬÑùµÄÓï·¨,ºÍ±àÒë³ÉÖмä´úÂëÔÙÔËÐеĹý³Ì.µ«ÊÇC#ÓëJavaÓÐ×ÅÃ÷ÏԵIJ»Í¬,Ëü½è¼øÁËDelphiµÄÒ»¸ ......
1¡¢JavaScriptÐÅÏ¢µÄÊäÈë
¡¡¡¡Í¨¹ýʹÓÃJavaScriptÖÐËùÌṩµÄ´°¿Ú¶ÔÏó·½·¨prompt(), ¾ÍÄÜÍê³ÉÐÅÏ¢µÄÊäÈë¡£¸Ã·½·¨ÌṩÁË×î¼ò±ãµÄÐÅÏ¢ÊäÈ뷽ʽ£¬Æä»ù±¾¸ñʽÈçÏ£º
Window.prompt("ÌáʾÐÅ", Ô¤¶¨ÊäÈëÐÅÏ¢);
¡¡¡¡´Ë·½·¨Ê×ÏÈÔÚä¯ÀÀÆ÷´°¿ÚÖе¯³öÒ»¸ö¶Ô»°¿ò, ÈÃÓû§×ÔÐÐÊäÈëÐÅÏ¢¡£Ò»µ©ÊäÈëÍê³Éºó£¬¾Í·µ»ØÓû§ËùÊäÈëÐÅÏ¢µÄÖµ¡£Àý: ......
º¯ÊýÒ»¡¢Ð´cookieµÄº¯Êý£¬½«CookieдÈë¿Í»§¶Ë£¬Í¨Óú¯Êý£¬´«Èë3¸ö²ÎÊý¼´¿É£¨CookieÃû×Ö£¬ÖµºÍʧЧÆÚ£©
//º¯Êý£ºÐ´Èëcookie
function WriteCookie (cookieName, cookieValue, expiry)
{
var expDate = new Date();
if(expiry) //Èç¹ûÉèÖÃÁËcookieʧЧʱ¼ä;
{
expDate.setTime (expDate.getTime() expiry);
documen ......