简体   繁体   English

通过(创建的Powershell)html按钮移动文件

[英]Moving a file through an (powershell created) html button click

We have a powershell script that creates a local html file and the owner of the this script wants to add a button (or something of similar functionality) to the bottom of the html page. 我们有一个Powershell脚本,它创建一个本地html文件,并且此脚本的所有者希望在html页面底部添加一个按钮(或类似功能的东西)。 When this button is clicked he wants to copy the html document into a new directory. 单击此按钮时,他想将html文档复制到新目录中。

I created the button, but now I am not sure what I should put in the onclick part of the button. 我创建了按钮,但是现在我不确定应该在按钮的onclick部分中放置什么。

I don't think IE will recognize powershell commands, and I could use javascript, but putting the javascript into the powershell script seems odd to me. 我认为IE无法识别powershell命令,我可以使用javascript,但是将javascript放入powershell脚本对我来说似乎很奇怪。

Any pointers? 有指针吗?

Odd or not, that is the way to go. 不论是否奇怪,这都是要走的路。 Just have the PS that creates the HTML document also write a javascript onClick event handler in the document as well. 只需创建HTML文档的PS也在该文档中编写一个javascript onClick事件处理程序即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM