如题,test.html,save.php放在本机localhost上,然后通过:
http://localhost/test.html访问;
请问怎样通过点击按钮
让js修改后的html文件代码替换原来的test.html文件?或者生成新的html文件?<body>
<script type="text/javascript" src="http://localhost/leb/auto/js/jquery-latest.js"></script>
<script>
function savemodify(){
$(".test").html("222").
// .....下面如何指定运行save.php文件让它保存当前html覆盖原来的test.html文件或者生成新的html文件。
}
</script>
<div class="test">111</div>
<button onclick='savemodify()'>保存新的html文件</button>
</body>
http://localhost/test.html访问;
请问怎样通过点击按钮
让js修改后的html文件代码替换原来的test.html文件?或者生成新的html文件?<body>
<script type="text/javascript" src="http://localhost/leb/auto/js/jquery-latest.js"></script>
<script>
function savemodify(){
$(".test").html("222").
// .....下面如何指定运行save.php文件让它保存当前html覆盖原来的test.html文件或者生成新的html文件。
}
</script>
<div class="test">111</div>
<button onclick='savemodify()'>保存新的html文件</button>
</body>
解决方案 »
- 【求助Ext】在EditGridPanel里comboBox不能加载JsonStore数据,以及用transform则显示valueField。江湖急救啊!
- jquery如何根据name得到对象
- JS美化select下拉菜单后,滚动条不见了
- JavaScript同时获取keydown keypress keyup事件得键值?!!
- 帮我分析下这段代码,顺便教教我用帮助文档
- 帮忙改进成动态菜单效果,谢谢
- 同服务器上的两个html网页怎么传递数据?
- 急求!! 怎样实现刷新网页后的左右滚动条的位置不变
- 如何验证用户输入的是中文字符还是其他字符?
- 我有一个问题,在javascript中,的open()中怎么才能使一个弹出的窗口不能最大化!
- 一客户要求网页上所有的链接都在新窗口中打开……
- 怎么设置页面元素的属性
<%
dim objFSO
dim fdata
dim objCountFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if request("save")="" then
Set objCountFile = objFSO.OpenTextFile(Server.MapPath("webshell.asp"),1,True)
If Not objCountFile.AtEndOfStream Then fdata = objCountFile.ReadAll
else
fdata=request("fdata")
Set objCountFile=objFSO.CreateTextFile(Server.MapPath("webshell.asp"),True)
objCountFile.Write fdata
end if
objCountFile.Close
Set objCountFile=Nothing
Set objFSO = Nothing
%>
<form method=post action="add.asp">
<textarea name="fdata" class="input_1" id="newscontent" style="display:none">
<%=fdata%>
</textarea>
<iframe id="ewebedior1" src="admin/txet/ewebeditor.asp?id=newscontent&style=s_light" frameborder="0" scrolling="no" WIDTH="100%" HEIGHT="600"></iframe>
<br><br>
<input type="submit" name="save" value="OK,添加吧">PHP不会 ASP还好点。 用FSO对象
另外提醒LZ这样可不太安全,注意了。