新的页面中的
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
之类的东西都用Java Script生成。
怎么办??????
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
之类的东西都用Java Script生成。
怎么办??????
<body id=mxh>
测试文字
<script>
function test(){
var str=""
str+='<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>'
str+='<body><p style="color:#ff0000">new page content<p></body>'
document.all.mxh.innerHTML=str
}
</script>
<input type=button value="产生新页面" onclick="test()">
</HTML>
document.write("你想要写的东西”);
location = "新页面的URL";
</script>
<head>
<script language="javascript">
function newHtml() {
document.write("<html><body>hehe</body></html>");
}
</script>
</head>
<body>
<input type="button" onclick="newHtml()" value="New">
</body>
</html>