ת JavaScriptµ÷ÓÃWebServices(ʹÓÃWebService.htc)
.XML Web services ÐÐΪʹ¿Í»§¶Ë½Å±¾Äܹ»µ÷ÓÃÓÉ Microsoft .NET XML Web services »òÆäËûÖ§³Ö¼òµ¥¶ÔÏó·ÃÎÊÐÒé (SOAP) µÄ Web ·þÎñÆ÷¹«¿ªµÄÔ¶³Ì·½·¨¡£
Ä¿µÄ£ºÌṩһÖÖ¼òµ¥µÄ·½·¨Ê¹ÓúÍÀûÓà SOAP£¬¶ø²»Ðè¾ßÓÐ SOAP ʵÏÖµÄרҵ֪ʶ¡£
²½Ö裺
1.ÏÂÔØWebservice.htc,Ðí¶àÍøÉϵÄÎÄÕ½éÉܸÃÎļþ¿ÉÒÔÔÚ΢ÈíµÄÍøÕ¾ÉÏÕÒµ½£¬µ«ÎÒ°´ÕÕµØÖ·µã½øȥʱ£¬Ö»¿´µ½ÍøÒ³²»´æÔÚµÄÌáʾ
2.´´½¨WebServiceÎļþ¼ÙÉèΪMathService.asmx£¬ÆäÌṩAddºÍSubtractÁ½¸ö·þÎñº¯Êý
3.´´½¨µ÷ÓõÄÍøÒ³ÎļþSample.htm(ÎļþÄÚÈÝÔÚÏÂÃæÏêϸ·ÖÎö)
4.½«Webservice.htc¸´ÖƵ½Sample.htmͬһĿ¼ÏÂ
5.ͨ¹ýä¯ÀÀÆ÷£¬ä¯ÀÀ¸ÃÍøÒ³
ÏÂÃæ·ÖÎöSample.htmµÄÄÚÈÝ£¨È¡×ÔMsdn£©
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<LINK REL="stylesheet" HREF="/workshop/samples/samples.css" TYPE="text/css">
<SCRIPT language="JavaScript">
var iCallID;
var callObj;
function init()
{
// ¶¨Î»WebService·þÎñλÖ㬲¢ÇÒΪ¸Ã·þÎñÖƶ¨Ò»¸öÃû×Ö
// ͬһServiceURl¿ÉÒÔÖ¸¶¨¶à¸öÃû×Ö,ServiceΪHTMÎļþÖеÄHTML TAG,¿ÉÒÔʹÓÃHTMLÖж¨ÒåµÄÈκαê¼Ç
service.useService("..\\..\\MathService.asmx?WSDL","MyMath");
// ½ûÓÃAdd°´Å¥.
doAddButton.disabled = true;
service.onserviceavailable = enableButton();
}
function enableButton(){
doAddButton.disabled = false;
}
function doAdd(x, y){
// ͬ²½µ÷Óà // ´´½¨Ò»¸ö the SOAPHeader object
var headObj = new Object();
// ´´½¨ the call object
callObj = service.createCallOptions();
callObj.async = false;
callObj.params = new Array();
callObj.params.a = x;
callObj.params.b = y;
callObj.funcName = "Add";
callObj.SOAPHeader = new Array();
callObj.SOAPHeader[0] = headObj;
oSPAN.innerText = x + " + " + y + " = ";
// ʹÓûص÷º¯Êý"mathResults"µ÷ÓÃ
iCallID = service.MyMath.callService(mathResults, callObj);
mathResults(iCallID);
}
function doSubtraction(y, x){
// Òì²½µ÷Óã¬ÕâÊÇϵͳĬÈϵĵ÷Ó÷½Ê½(the default)
oSPAN.innerText = y + " - " + x + " = ";
// µ÷ÓÃSubtract
// ʹÓûص÷º¯Êý"mathResults"µ÷ÓÃ
iCallID = service.MyMath.callService(mathResults, "Subtract", y, x);
}
functio
Ïà¹ØÎĵµ£º
function testExe(entityId, wfId) {
var id = crmForm.ObjectId;
var xml = "" +
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http:/ ......
ÔÚ×öÍøÕ¾µÄʱºò£¬ÎÒÃǾ³£ÐèÒª¶Ô³ß´ç³¬±êµÄͼƬ½øÐÐËõ·Å¡£
ÓÉÓÚä¯ÀÀÆ÷µÄ²îÒ죬ÓÐЩ´úÂëijЩä¯ÀÀÆ÷¹¤×÷²»Õý³£¡£
¾¹ýÑо¿µÃµ½ÁËÒÔϵĴúÂ룬Ëü¿ÉÒÔÔÚIE6,IE8,FireFoxÖÐÍêÃÀµØ°´±ÈÀýËõ·ÅͼƬ¶ø²»Ê§Õæ¡£
//¸Ä±äͼƬ´óС
function resizepic(o)
{
var maxwidth=550; //¶¨Òå×î´ó¿í¶È
var maxheight=800;&nbs ......
JavaScriptʱ¼ä²î¼ÆË㺯Êý
<mce:script language="javascript"><!--
Date.prototype.dateDiff = function(interval,objDate){
//Èô參數²»×ã»ò objDate ²»ÊÇÈÕÆÚÎï¼þ則»Ø傳 undefined
if(arguments.length<2||objDate.constructor!=Date) return undefined;
......
function openCheck()
{
if (!this.external)
{
app.alert("Acrobat¤Ç¤Ï実ÐФǤ¤Þ¤»¤ó");
this.closeDoc(true);
// var myDoc = event.target;
// myDoc.closeDoc(true);
}
}
openCheck();
ÐèҪעÒâµÄÊÇ:
1. ÉÏÊöµÄsourceÖ»ÄÜÔÚPDF ÓÃAcrobat Reader´ò¿ªÊ±²ÅÆð×÷ÓÃ,
ÈçÓÃIEµÈ´ò¿ªÊ±»á±¨¡¸NotSu ......
Link:http://topic.csdn.net/u/20100317/15/687e21bc-40f3-4f0e-bc22-5f2a32ceb1a3.html?seed=1664090183&r=63989333#r_63989333
<HTML>
<head>
<title>sample</title>
<mce:script language="JavaScript"><!--
var c="FFFFFF";
window.onload=function (){
setInterval(s ......