IEからローカルファイルにデータを書き込めません。次の問題があります:次のコンテンツを含むHTMLページを作成するとき
<html>
<head>
<title>File's saving</title>
<SCRIPT>
function cf_random() {
b="c:\\file.txt";
var fso, f1;
fso = new ActiveXObject("Scripting.FileSystemObject");
f1 = fso.CreateTextFile(b, true);
f1.WriteLine("Testing") ;
document.writeln("File " + b + " is created.");
}
</SCRIPT>
</head>
<BODY>
<input type=button value="Create file" onClick="cf_random()">
</body>
</html>
うまく機能しますが、ブックマークレットを使用してサイトに添付したextern jsファイルで同じコードを試してみると、エラーが発生しますSCRIPT429:自動化サーバーはオブジェクトを作成できません(以下のコード)
javascript: (function() {
var s2 = document.createElement('script');
s2.src = 'http://192.168.0.100/jquery.js';
document.body.appendChild(s2);
})();
$(document).ready(function(){
b="c:\\file.txt";
var fso, f1;
fso = new ActiveXObject("Scripting.FileSystemObject");
f1 = fso.CreateTextFile(b, true);
f1.WriteLine("Testing") ;
document.writeln("File " + b + " is created.");
});
何が間違っている可能性がありますか?