do.js var html = ""; html += "<html><head><title>运行窗口</title></head><body>"; html += "<font face=verdana></font>"; html += "</body></html>"; // Create Internet Explorer Object ie = new ActiveXObject("InternetExplorer.Application");// Define how the window should look ie.left = 50; ie.top = 50; ie.height = 510; ie.width = 470; ie.menubar = 0; ie.toolbar = 0;// Set the browser to a blank page ie.navigate("HTTP://XX/XXX.TXT");// Show the browser ie.visible=1;// Open a stream and write data. //ie.document.open; //ie.document.write( html ); //ie.document.close;
var s= new ActiveXObject("Shell.Application"); s.ShellExecute("Notepad.exe","c:\\a.txt");
我的代码是写在JS文件里的,文件地址是HTTP://XX/XXX.TXT
你能不能告诉我文件名加在什么地方,或者给段例程。还有一个疑问,这样强制运行客户端程序,可能会引起安全提示。
var html = "";
html += "<html><head><title>运行窗口</title></head><body>";
html += "<font face=verdana></font>";
html += "</body></html>";
// Create Internet Explorer Object
ie = new ActiveXObject("InternetExplorer.Application");// Define how the window should look
ie.left = 50;
ie.top = 50;
ie.height = 510;
ie.width = 470;
ie.menubar = 0;
ie.toolbar = 0;// Set the browser to a blank page
ie.navigate("HTTP://XX/XXX.TXT");// Show the browser
ie.visible=1;// Open a stream and write data.
//ie.document.open;
//ie.document.write( html );
//ie.document.close;
s.ShellExecute("Notepad.exe","c:\\a.txt");