我有一个 c# 脚本,它在某个时候创建一个字符串变量,如何将其另存为 HTML 文件在脚本的同一目录中?
string saveHtml = "<html>" +
"<head>" +
" <title>Select Image</title>" +
" <script type=\"text/javascript\">" +
" function displayImage(elem) {" +
" var image = document.getElementById(\"canvas\");" +
" image.src = elem.value; " +
" }" +
" </script>" +
"</head>" +
"<body>" +
" <form name=\"controls\">" +
" <img id=\"canvas\" src=\"pictures/fire1.jpg\" />" +
" <select name=\"imageList\" onchange=\"displayImage(this);\">" +
" <option value=\"pictures/001JRPchargeable.png\">Fire 1</option>" +
" <option value=\"pictures/001JRPNonchargeable.png\">Fire 2</option>" +
"</select>" +
" </form>" +
"</body>" +
"</html>";
慕桂英4014372
慕后森
相关分类