Problems encountered in the project, the company is using pb9.0, the URL needs to be encoded, and the third-party document above the JS example, that is, you can use JS encodeURI URL encoding,
So think whether you can directly use the JS control to use JS function, Baidu a bit, found that there is really, a combination of users of the method, wrote the following methods
/*uf_encodeuriref string As_url//the Urlref string as_error that needs to be encoded*/IF inv_string. of_isempty (as_url) then As_error="The address cannot be empty!" RETURN-1END ifoleobject Lo_jsscriptlo_jsscript=Create OLEObject Long Ll_retll_ret=lo_jsscript.connecttonewobject ("Msscriptcontrol.scriptcontrol")ifLl_ret <>0 ThenAs_error='Error creating Msscriptcontrol.scriptcontrol object, please register MSScript.ocx, error code:'+String (Ll_ret) return-1End ifLo_jsscript.language="JScript" String Ls_urlls_url= Lo_jsscript. Eval ('encodeURI (~ ' + As_url +'~')') As_url=Ls_urldestroy Lo_jsscriptreturn1
Note that when you encode a URL, you use the MSScript.ocx control, which is the system's own control, and when you open the browser, if you are prompted not to install the control, the control is logged off or deleted, and then it is installed.
A) unzip the Msscript.rar package directly and copy the MSScript.ocx file into the system directory:
1. Windows 95/98/me System, copy MSScript.ocx to C:\Windows\System directory.
2. Windows nt/2000 System, copy MSScript.ocx to C:\WINNT\System32 directory.
3. Windows Xp/win7/vista System (64-bit system corresponds to 64-bit DLL file, 32-bit system corresponds to 32-bit DLL file), copy MSScript.ocx to C:\Windows\System32 directory.
4, if your system is 64-bit please copy the 32-bit DLL files to the C:\WINDOWS\SYSWOW64 directory specific methods can refer to this article: Win7 64-bit flagship system running Regsvr32.exe prompt version incompatible
b) Open "Start-run-input regsvr32 msscript.ocx", enter to resolve. Hope that the msscript.ocx provided by the Scripting House is helpful to you
If the prompt "module Atiacmxx.dll may not be compatible with the version of Windows you are running, check if the module is compatible with RegSvr.Exe's x86 or x64 version" then turn on cmd:
Navigate to the C:\WINDOWS\syswow64 directory and enter the regsvr32 msscript.ocx.
PB9.0 on the use of JS encodeURI