window.open一个新窗口后,用document.writeln写入时的编码设定
2009-12-16 23:59
260 查看
参考代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift-JIS"> <title>Untitled</title> <mce:script type="text/javascript" charset="Shift-JIS"><!-- function xpx(){ var wo = window.open("test2.html","_blank", "charset=Shift-JIS"); var srcstr = "<!DOCTYPE HTML PUBLIC /"-//W3C//DTD HTML 4.0 Transitional//EN/"><html><head><meta http-equiv=/"Content-Type/" content=/"text/html; charset=Shift-JIS/"><title>Untitled</title></head><body><span id=/"prait/">//adsfasfefeae</span></body></html>"; wo.document.writeln(srcstr); wo.document.all.prait.innerHTML = document.all.er.innerHTML; wo.document.charset ="Shift-JIS"; } // --></mce:script> </head> <body> <input type="button" value="123" id="xxx" onclick="xpx()">Hello World! <span id="er">/123124151</span> </body> </html>
相关文章推荐
- window.open打开一个窗口最大化
- JavaScript基础 window.open(url,name,options) 弹出一个 新窗口 屏幕居中显示 获取屏幕的有效宽度
- window.open 开一个新标签还是窗口设置
- Gridview中点击链接window.open一个新窗口(showModalDialog()、showModelessDialog()方法使用详解)
- window.open打开一个居中的窗口
- iframe/window.open打开一个新窗口/子窗口中调用父窗口的方法
- 让一个表单以post的方式在window.open的窗口中打开
- window.open打开一个新窗口
- window.open多次点击只点出一个窗口
- 怎么弹出一个既不会被拦截,又是window.open方式实现的最大化弹出窗口?
- window.open打开一个新窗口/子窗口中调用父窗口的方法
- 创建一个窗口window.open,检查窗口是否已关闭或不
- window.open打开一个新窗口/子窗口中调用父窗口的方法
- IE7通过window.open打开一个隐藏的子窗口
- JavaScript各种对话框(alert、confirm、prompt),window.open打开关闭窗口,document.write输出内容
- Window.open 实现导航与打开窗口,导航到一个特定链接地址,也可以打开一个新的浏览器窗体
- js window.open 弹出窗口设置 UTF-8编码的问题解决
- window.open打开一个窗口最大化
- window.open打开一个新窗口/子窗口中调用父窗口的方法
- JavaScript基础 window.open(url,name,options) 弹出一个 新窗口 屏幕居中显示 获取屏幕的有效宽度