lz可以试试定义一个div,让后把想要展示的html代码写到div.innerHTML中应该可以实现.
解决方案 »
- 选项卡效果
- swfobject和flashvars高手进
- 如何用jQuery把HTML中Table列在行放到Table的第一行?
- 求做过网页音乐播放器的帮帮忙
- 怎么让多行的select只选一个记录?
- (急!)如何用javascript实现框架树或N叉树的展现?
- 刷新时有时候会弹出对话框说让你选择是否重试指令,请问能不能屏蔽这个功能?
- 浮动提示窗口问题。
- 请看一面代码.想改成只显示一个层.然后从右向左飞.飞在屏幕的中间.速度试中.飞一次就行了.速度试中就行?
- 请问显示web页面上的button 的javascript怎么写呢?
- 10多行的代码出现两个古怪问题,望高人解答,献上50分了。
- JS弹出窗口无法正常运作
网络都已经断了, 用AJAX取返回码 这个应该比较简单点。对于LZ 的1 网络都断的, 也不能访问服务器了,第一当然是实现不了的。
对于第二点, 就是比较多工作量,要在每个页面都要用JS 在客户端弹出。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload = function(){
var win = window.open('about:blank', 'error', '');
var html = document.getElementById("divError").innerHTML;
win.document.write(html);
win.document.close();
};
</script>
</head><body>
<div id="divError" style="display:none">
<font color="red"><strong>出错了!</strong></font>
</div>
</body>
</html>
function fetchStatus(address) {
var client = new XMLHttpRequest();
client.onreadystatechange = function() {
// in case of network errors this might not give reliable results
if(this.readyState == 4)
returnStatus(this.status);
}
client.open("HEAD", address);
client.send();
}
http://www.w3.org/TR/XMLHttpRequest/
目前的情况是,客户不同意用<div>显示信息的方法。
必须用打开一个新IE窗口的方式显示信息。
》对于第二点, 就是比较多工作量,要在每个页面都要用JS 在客户端弹出。
怎么实现,给个思路。
出来的一定是模式窗口。<html><head><SCRIPT LANGUAGE="javascript">function openwin(){OpenWindow=window.open("", "newwin", "height=250,width=250,alwaysRaised=yes,toolbar=no,scrollbars="+scroll+",menubar=no");OpenWindow.document.write("<TITLE>例子</TITLE>")OpenWindow.document.write("<BODY BGCOLOR=#ffffff>")OpenWindow.document.write("<h1>Hello!</h1>")OpenWindow.document.write("New window opened!")OpenWindow.document.write("</BODY>")OpenWindow.document.write("</HTML>")OpenWindow.document.close()}</SCRIPT></head><body><a href="#" onclick="openwin()">打一个窗口</a><input type="button" onclick="openwin()" value="打窗口"></body></html>