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

Javascriptµ÷ÓÃWebserviceµÄ¶àÖÖ·½·¨

ͨ¹ýxmlhttp+webservice(ԭʼ·½·¨)
Ô­ÎĵØÖ·:http://netboy.cnblogs.com/archive/2006/02/18/333260.html
 view plaincopy to clipboardprint?
using System;  
using System.Web;  
using System.Web.Services;  
using System.Web.Services.Protocols;  
 
[webservice(namespace = "http://tempuri.org/")]  
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]  
public class Service : System.Web.Services.WebService  
{  
    public Service ()   
    {  
        //uncomment the following line if using designed components   
        //InitializeComponent();   
    }  
 
    [webmethod]  
    public string SayHelloTo(string Name)   
    {  
        return "Hello "+Name;  
    }  

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[webservice(namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
 public Service ()
 {
  //uncomment the following line if using designed components
  //InitializeComponent();
 }
 [webmethod]
 public string SayHelloTo(string Name)
 {
  return "Hello "+Name;
 }
}
 
»¹ÊÇË×Á˵㡣:)
2. jsµ÷ÓÃwebservice+xmlhttpµÄʵÏÖ²¿·Ö¡£
view plaincopy to clipboardprint?
<html> 
    <title>Call webservice with javascript and xmlhttp.</title> 
<body> 
    <mce:script language="javascript"&


Ïà¹ØÎĵµ£º

javascript ʵÏּ̳Ð

<mce:script language="javascript" ><!--
function person(name,age)
{
this.name=name;

this.age=age;
}
function man(name,age)
{
this.sex="ÄÐ";
this.base=person;
this.base(name,age);
}
function woman(name,age)
{
this.sex="Å®";
this.base=person;
this.base(name,age)
} ......

javascriptÖÐsetTimeout()º¯Êý

javascriptÖÐsetTimeout()º¯Êý
´ó¼Ò¶¼ÖªµÀjavascriptÖеÄsetTimeput()º¯ÊýµÄ×÷Óã¬Ò»°ã»áÓÃËûÀ´´¦ÀíһЩÁ¬ÐøµÄÊÂÇ飬ÃÇÏÈ¿´Ò»¸öÀý×Ó£º
<head>
    <script>
        function init()
         ......

JavaScriptÃæÏò¶ÔÏóÏê½â

ÄÚÖÃÀà
JavaScriptÊÇÒ»ÖÖ»ùÓÚ¶ÔÏóµÄ½âÊÍÐÔ±à³ÌÓïÑÔ£¬ËùÓеÄÔªËØ£¬ÎÒÃǶ¼¿ÉÒÔÀí½âΪ¶ÔÏó£¬Ã¿¸ö¶ÔÏóÒ²¿ÉÒÔÀí½âΪN¶àÊôÐԵļ¯ºÏ¡£ÔÚÌÖÂÛ×Ô¶¨ÒåÀà֮ǰ£¬ÎÒÃÇÏÈ¿´Ò»ÏÂÄÚÖõÄÀà¡£×÷Ϊ½âÊÍÐÔÓïÑÔ£¬JavaScriptÔÊÐíÎÒÃÇÔÚÈκÎʱºòΪ¶ÔÏóÌí¼ÓÊôÐÔ¡£ËùÒÔÎÒÃÇ¿ÉÒÔÏÈ¿´Ò»¶Î¼òµ¥µÄ´´½¨¶ÔÏóµÄ´úÂëÆ¬¶Î¡£ÕâÀïµÄ“new Object”Ò²¿ ......

javascriptÖеÄÄ£¿éºÍÃû×Ö¿Õ¼ä

JavaScriptÖеÄÄ£¿éºÍÃû×Ö¿Õ¼äÊDz»¿ÉÇø·ÖµÄÄÚÈÝ¡£
ÎÒÃǶ¨ÒåµÄÿ¸öµ¥¶ÀµÄº¯Êý¶¼ÊÇ×÷Ϊȫ¾Ö¶ÔÏóµÄÒ»¸öÊôÐÔ¡£¶øJavaScript´úÂëÄ£¿éËù±ØÐë×ñÑ­µÄ×îÖØÒªµÄ¹æÔò¾ÍÊÇ£º±ÜÃⶨÒåÈ«¾Ö±äÁ¿¡£ÒòΪ£¬µ±¶¨ÒåÒ»¸öÈ«¾Ö±äÁ¿Ê±£¬¶¼Òª±»ÆäËûÄ£¿é¸²¸ÇµÄΣÏÕ£¬ËùÒÔÄ£¿é»¯±àÂëÒªÓÃÈçÏ·½Ê½£º
var ModuleClass={};
ModuleClass.º¯ÊýÃû1=functio ......

JavaScriptÔÚIEµØÖ·À¸ÖеÄÃîÓÃ

ÍêÈ«´ò¿ªÒ³Ãæºó£¬ÔÚ¸ÃÒ³µÄÔÚIEµØÖ·À¸ »ò °´Ctrl+O ÊäÈëÒÔÏ´úÂ룬»Ø³µ£¬¾Í¿ÉÒԵõ½ÏàÓ¦µÄЧ¹û£º
1.ÏÔÊ¾ÍøÒ³ÖеÄËùÓÐͼƬ
javascript:Ai7Mg6P='';for%20(i7M1bQz=0;i7M1bQz<document.images.length;i7M1bQz++){Ai7Mg6P+='<img%20src='+document.images[i7M1bQz].src+'><br>'};if(Ai7Mg6P!=''){document.wri ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ