如何用javascript脚本实现打开像window中的“选择文件”、“另存为”等文件对话框作者:陈格 日期:2007-12-29字体大小: 小 中 大
问:
document.execCommand("open")好象不是直接打开选择文件的对话框。
______________________________________________________________________________________________
答1:
<input type=button value=剪切 οnclick="document.execCommand('Cut')">
<input type=button value=拷贝 οnclick="document.execCommand('Copy')">
<input type=button value=粘贴 οnclick="document.execCommand('Paste')">
<INPUT type=button value=打印 οnclick="document.execCommand('Print')">
<input type=button value=全选 οnclick="document.execCommand('SelectAll')">
<input type=button value=撤消 οnclick="document.execCommand('Undo')">
<input type=button value=删除 οnclick="document.execCommand('Delete')">
<input type=button value=黑体 οnclick="document.execCommand('Bold')">
<input type=button value=斜体 οnclick="document.execCommand('Italic')">
<input type=button value=下划线 οnclick="document.execCommand('Underline')">
<input type=button value=停止 οnclick="document.execCommand('stop')">
<input type=button value=保存 οnclick="document.execCommand('SaveAs')">
<input type=button value=另存为 οnclick="document.execCommand('Saveas',false,'c:\\test.htm')">
<input type=button value=字体 οnclick="document.ex
js 实现各种格式对话框
最新推荐文章于 2022-07-06 17:09:10 发布