我正在尝试使用javascript创建一个文本文件.我尝试了以下代码,但这没有用.请给我一个解决方案.谢谢 .
var fso, file;
fso = new ActiveXObject("Scripting.FileSystemObject");
file = fso.CreateTextFile("c:\\Mytest\test.txt");
file.Close();
Run Code Online (Sandbox Code Playgroud) javascript google-chrome creation filesystemobject text-files
我无法alert()通过onclick()事件触发弹出窗口。
{
"name": "Project",
"version": "1.0.0",
"manifest_version": 2,
"description": "Popup when website requires Log in",
"browser_action":{
"default_icon":"icon_19.png",
"default_popup":"Popup.html"
}
}
Run Code Online (Sandbox Code Playgroud)
<html>
<head></head>
<body>
<div class="plus" onclick="popup()"></div>
<script src="inline.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
function popup() {
var link = document.URL;
alert("This is the link: (" + link + ")");
}
Run Code Online (Sandbox Code Playgroud) javascript event-handling google-chrome-extension dom-events google-chrome-app