asp ajaxÐÂÎÅÆÀÂÛ
Ajax.js
// AJAXÀà
function AJAXRequest() {
var xmlObj = false;
var CBfunc,ObjSelf;
ObjSelf=this;
try { xmlObj=new XMLHttpRequest; }
catch(e) {
try { xmlObj=new ActiveXObject("MSXML2.XMLHTTP"); }
catch(e2) {
try { xmlObj=new ActiveXObject("Microsoft.XMLHTTP"); }
catch(e3) { xmlObj=false; }
}
}
if (!xmlObj) return false;
this.method="POST";
this.url;
this.async=true;
this.content="";
this.callback=function(cbobj) {return;}
this.send=function() {
if(!this.method||!this.url||!this.async) return false;
xmlObj.open (this.method, this.url, this.async);
if(this.method=="POST") xmlObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlObj.onreadystatechange=function() {
if(xmlObj.readyState==4) {
if(xmlObj.status==200) {
ObjSelf.callback(xmlObj);
}
}
}
if(this.method=="POST") xmlObj.send(this.content);
else xmlObj.send(null);
}
}
ǰ̨ҳÃæ:
<style type="text/css">
#fbpl
{
width:600px;
height:200px;
background-color:#EEEEEE;
}
#fbbt
{
height:30px;
padding-top:5px;
text-align:center;
font-weight:bold;
color:#FF0000;
background-color:#CCCCCC;
}
#fbfm
{
text-align:left;
margin-left:80px;
}
#fbfm ul {
margin:10px;
padding:0px;
}
#fbfm li {
list-style: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
#nc
{
width:300;
border:#CCCCCC solid 1px;
}
#content
{
width:350;
height:100;
border:#CCCCCC solid 1px;
}
#anniu
{
height:30px;
text-align:center;
}
.bt
{
background-color:#FFFFFF;
color:#000000;
font-size:12px;
width:60;
height:20;
border:#CCCCCC solid 1px;
}
#pllist
{
width:600px;
background-color:#EEEEEE;
font-size:12px;
}
#pllbt
{
height:30px;
padding-top:5px;
text-align:center;
font-weight:bold;
color:#FF0000;
background-color:#CCCCCC;
}
#plbox
{
font-size:12px;
}
/*
.u {
font-size: 12px;
float:left;
height:25px;
line
Ïà¹ØÎĵµ£º
1.html´úÂë formnameÊÇ±íµ¥name,editnameÊÇÎļþÓòname,uppathÊÇÉÏ´«Îļþ±£´æ·¾¶.
<input name="qtxx" type="text" id="qtxx" size="50" />
<input type="button" name="Submit22" value="ÉÏ´«Í¼Æ¬" onClick="window.open('upload.asp?formname=from1&editname=qtxx&uppath ......
ÔÚaspÊý×鶨ÒåÖÐ,¿ÉÒÔÖ±½Ó¶¨Òå,Ò²¿ÉÒÔʹÓÃArrayº¯Êý¶¨Òå..
ÏÈ¿´ÓÃArray()º¯Êý¶¨ÒåÀý×Ó:
<%
dim MyArray
MyArray=Array("ÌìÑÄ·çÔÆ","СС³ÌÐòÔ±")
%>
<p><%=MyArray(1)%></p>
·µ»Ø½á¹û:СС³ÌÐòÔ±
Ö±½Ó¶¨Òå:
<%
dim MyArray(2)
MyArray(0)="ÌìÑÄ·çÔÆ"
MyArray(1)="СС³ ......
Ò»¡¢´¦ÀíajaxÇëÇóµÄjspÎļþ£ºauto.jsp
<%@ page contentType="text/html; charset=gb2312" %>
<%
//ÉèÖÃÊä³öÐÅÏ¢µÄ¸ñʽ¼°×Ö·û¼¯
response.setContentType("text/xml; charset=UTF-8");
response.setHeader("Cache-Control","no-cache&q ......
WebService·þÎñ¶Ë¿ª·¢
1¡¢´´½¨WebService¹¤³Ì£¬Ñ¡ÔñXFire Core¿â
2¡¢´´½¨ÒµÎñ½Ó¿ÚºÍÆäʵÏÖÀࣨÍê³ÉÒµÎñ·½·¨µÄ¶¨ÒåºÍʵÏÖ£©
3¡¢ÐÞ¸ÄÅäÖÃÎļþservice.xml
4¡¢Èç¹ûÐèҪʹÓÃWSDL£¬ÔòÐèÒªµ¼Èëxalan.jarÎļþÖÁWEB-INF/libÖÐ
5¡¢µ¼³ö½Ó¿ÚÖÁjar°üÖÐΪ¿Í»§¶Ë×ö×¼±¸
WebService¿Í»§¶Ë¿ª·¢
1¡¢´´½¨Web¹¤³Ì£¬Ìí¼Ó¹¹½¨Â·¾¶£¬Ñ¡ÔñX ......
ΪʲôÔÚASPÀïÖ¸¶¨ÁËcodepageΪ65001»¹¾³£ÏÔʾÂÒÂë¡£²Å×ÓÔÚÕâÀォÕâ¸öÎÊÌâÏêϸ½âÊÍһϣ¬ÒÔÃâºÜ¶àÅóÓÑÔÙ×ßÍä·£¬ÉõÖÁÅųâUTF-8¡£ CHINAZ
¡¡¡¡Èç¹ûÄ㻹²»ÖªµÀUTF-8ÊÇʲô¶«¶«£¬ÄDzÅ×Ó½¨ÒéÄãÏÈÈ¥ËÑË÷Ò»ÏÂUTF-8µÄÏà¹Ø×ÊÁÏ°É¡£
¡¡¡¡UTF-8±àÂëÖ®ËùÒÔ±»Ô½À´Ô½¶àµÄÈ˽ÓÊÜÉõÖÁϲ»¶£¬¿Ï¶¨ÊÇÓеÀÀíµÄ£¬ÔÚWEB2.0Ê¢ÐеĽñÌ죬ÔÚ´ó̸ ......