frogram

所属分类:JavaScript/JQuery
开发工具:Java
文件大小:1KB
下载次数:1
上传日期:2017-06-28 19:24:52
上 传 者PR!445
说明:  将JScript ,NET assembly(汇编体)插入到IE页面 不错的
(Will JScript.net assembly (assembly) is inserted into the IE page is good)

文件列表:
ITestControl.html (755, 2001-07-20)
4TestControl.js (1073, 2001-07-20)

Sample of running compiled JScript .NET code in IE ================================================== This is just a sample to show that it's _possible_ to write compiled JScript .NET code that will work inside IE. There are three basic problems though: 1 It requires the user to have .NET installed 2 It requires the web page to have FullTrust, since accessing the IE DOM relies on COM interop 3 COM interop is slow Nevertheless, for some situations (particularly corporate apps), this may be a good solution. I am also working on a sample to enable you to embed script inside the HTML page itself, and run it via VSA. Anyway, here are the steps to try out the demo: 1 Compile the file with: jsc /t:library TestControl.js 2 Put the DLL and the HTML file into \inetpub\wwwroot (or make the current directory a virtual IIS directory, or whatever) 3 Make sure you have appropriate permissions to use COM interop from that URL. You can do this with the following command, but it will let ANY code on the named server have full access to your machine: caspol -machine -addgroup 1 -url http://servername/* FullTrust 4 Open the page in the browser, and click the document or press a key, eg: start http://servername/TestControl.html Note that you need to kill and restart IE everytime you recompile the DLL, as it keeps a cached copy lying around. Enjoy! Peter -- Peter Torr, JScript .NET Program Manager news://msnews.microsoft.com/microsoft.public.dotnet.languages.jscript

近期下载者

相关文件


收藏者