如何通过脚本将javascript文件从服务器复制到客户端pc

how to javascript file copy from server to client pc by script

本文关键字:复制 服务器 客户端 pc 文件 何通过 脚本 javascript      更新时间:2023-09-26

我想让我的java脚本文件从服务器复制到客户端计算机,并在每1小时内自动运行客户端pc java脚本文件这可能吗?

	// request permission on page load
document.addEventListener('DOMContentLoaded', function () {
  if (Notification.permission !== "granted")
    Notification.requestPermission();
});
function notifyMe() {
  if (!Notification) {
    alert('Desktop notifications not available in your browser. Try Chromium.'); 
    return;
  }
  if (Notification.permission !== "granted")
    Notification.requestPermission();
  else {
    var notification = new Notification('Notification title', {
      icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png',
      body: "Hey there! You've been notified!",
    });
    notification.onclick = function () {
      window.open("http://stackoverflow.com/a/13328397/1269037");      
    };
    
  }
}
<button onclick="notifyMe()">
  Notify me!
</button>