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"&
Ïà¹ØÎĵµ£º
1.HTMLÎĵµÊ÷Ðαíʾ
2.Node[] Node.childNodes
//·µ»ØNode¶ÔÏóµÄËùÓÐ×Ö½Úµã
3.Node.firstChild / lastChild /nextSibling(ÏÂÒ»¸öÐֵܽڵã) / previousSibling (ÉÏÒ»¸öÐֵܽڵã) / parentNode
ÊôÐÔ
4.Node.appendChild() / removeChild() / replaceChil ......
Ò»¡¢deleteÔËËã·ûɾ³ý¶ÔÒÔǰ¶¨ÒåµÄ¶ÔÏóÊôÐÔ»ò·½·¨µÄÒýÓãº
var o=new Object();
o.name="hello";
alert(o.name); //Êä³ö“hello”
delete o.name£»
alert(o.name); //Êä³ö& ......
±¾ÎĽéÉÜÈçϼ¸¸ö·½ÃæµÄÄÚÈÝ:
1.ÈçºÎ´´½¨Êý×é
2.ÈçºÎ¶ÔÊý×é½øÐвÙ×÷£¨Ìí¼Ó,ɾ³ý,¶ÁÈ¡)
3.Êý×é³£¼û·½·¨ºÍÊôÐÔ
ÈçºÎ´´½¨Ò»¸öÊý×é,Ò»°ãµØ¸ù¾Ý³õʼ»¯É趨¼òµ¥·ÖΪ3ÖÖ:
1.µ¥´¿´´½¨Êý×é:
var arr=new Array();
Òªµã:ÓÃnew¹Ø¼ü×Ö´´½¨Êý×é¶ÔÏóArray(),Array()¶ÔÏóÊÇÒ»¸ö±¾µØÀà,¿ÉÒÔÓÃnew´´½¨Ò»¸ö¶ÔÏóºóʹÓÃ
2.´´½¨Ê ......
jsÈçºÎʵÏÖÔÚÒ³ÃæÍêÈ«¼ÓÔØºóÖ´ÐÐjavascriptº¯Êý»ò/´úÂëÄØ?
¿ÉÒÔÊÇÒÔϼ¸ÖÖ
<body onload="function name()" > </body >
<script >window.onload=function name </script >
<script language="javascript" for="window" event="onload" >function name(); </script >
µ ......
×ªÔØ×Ô£ºhttp://www.ruanyifeng.com/blog/2009/09/find_element_s_position_using_javascript.html
Áíһƪ£ºhttp://blog.csdn.net/ivan820819/archive/2009/09/03/4515122.aspx
ÖÆ
×÷
ÍøÒ³µÄ¹ý³ÌÖУ¬ÄãÓÐʱºòÐèÒªÖªµÀij¸öÔªËØÔÚÍøÒ³ÉϵÄÈ·ÇÐλÖá£
ÏÂÃæµÄ½Ì³Ì×ܽáÁËJavascriptÔÚÍøÒ³¶¨Î»·½ÃæµÄÏà¹ØÖª
ʶ¡£
Ò»¡¢ÍøÒ³µ ......