急,求救!!这个子窗口是如何实现的? (子窗口在父窗口上) 急,求救!!请大家帮忙看看这个链接,这个子窗口是如何实现的? (子窗口在父窗口上)http://shop.usa.canon.com/webapp/wcs/stores/servlet/product_10051_10051_214039_-1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <style type="text/css">.opaqueLayer{display:none;position:absolute;top:0px;left:0px;opacity:0.6;filter:alpha(opacity=60);background-color: #000000;z-Index:1000;}</style><script type="text/javascript">function getBrowserHeight() {var intH = 0;var intW = 0;if(typeof window.innerWidth == 'number' ) {intH = window.innerHeight;intW = window.innerWidth;}else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {intH = document.documentElement.clientHeight;intW = document.documentElement.clientWidth;}else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {intH = document.body.clientHeight;intW = document.body.clientWidth;}return { width: parseInt(intW), height: parseInt(intH) };}function setLayerPosition() {var shadow = document.getElementById('shadow');var question = document.getElementById('question');var bws = getBrowserHeight();shadow.style.width = bws.width + 'px';shadow.style.height = bws.height + 'px';question.style.left = parseInt((bws.width - 350) / 2)+ 'px';question.style.top = parseInt((bws.height - 200) / 2)+ 'px';shadow = null;question = null;} function showLayer() { setLayerPosition(); var shadow = document.getElementById('shadow'); var question = document.getElementById('question'); shadow.style.display = 'block'; question.style.display = 'block'; shadow = null; question = null; } function hideLayer() { var shadow = document.getElementById('shadow'); var question = document.getElementById('question'); shadow.style.display = 'none'; question.style.display = 'none'; shadow = null; question = null; }window.onload=function(){ window.onresize = setLayerPosition;}</script><iframe id="shadow" class="opaqueLayer" style="border:0;" src="about:blank"></iframe><input type="button" value="click" onclick="showLayer();"><div id="question" style="width:340px;height:250px;padding:0px;display:none;position:absolute;z-index:1001;background:#CCC;border:10px solid #999;"> <img width="320" height="210" src="http://shop.usa.canon.com/wcsstore/eStore/images/sx200is_black_1_xl.jpg"><br> <input type="button" value="关闭" onclick="hideLayer()"></div> 我的理解就是一个div的显示和隐藏<input type=button value="click me" onclick="showFloat()"><div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px; width: 800px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%; margin: -200px 0 0 -400px;"> <div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;"> 这里放图片 <br /> <div> <input id="BttCancel" type="button" value=" 取 消 " onclick="ShowNo()" class="BigButton" /> </div> </div> </div> <input type="hidden" id="pagestate" runat="server" /> </form> <script> function thisclick(id) { document.getElementById("cuee").value = id; } function ShowNo() { document.getElementById("divLogin").style.display="none"; } function showFloat() { document.getElementById("divLogin").style.display=""; } </script>放图片的地方放个IMG控件,加个hidden控件来获取图片的路径,然后再在IMG显示就行了 form1.username.value 为空或不是对象 要一个关于关于姓名的校验 想问下,这个javascript里面的问题!谢谢大家 在firefox里使用xmlhttp的问题,急。。大家帮帮忙。。。 字符比较求助 如何屏蔽“查看源文件”中的javascript代码? 请各位大哥帮忙看看这段代码 在改变下拉框时,如果得到下拉框的值,并把它显示在文本框中 javascript中把数组传给SERVLET,得到的值却为NULL,请指教 关于动态生成HTML的问题,100分在线等候! 还是搜索框的问题,怎么到编码不同的网站? 求正则 , 不准许 空格和<>" \&
<style type="text/css">
.opaqueLayer{display:none;position:absolute;top:0px;left:0px;opacity:0.6;filter:alpha(opacity=60);background-color: #000000;z-Index:1000;}
</style>
<script type="text/javascript">
function getBrowserHeight() {
var intH = 0;
var intW = 0;if(typeof window.innerWidth == 'number' ) {
intH = window.innerHeight;
intW = window.innerWidth;
}
else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
intH = document.documentElement.clientHeight;
intW = document.documentElement.clientWidth;
}
else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
intH = document.body.clientHeight;
intW = document.body.clientWidth;
}
return { width: parseInt(intW), height: parseInt(intH) };
}function setLayerPosition() {
var shadow = document.getElementById('shadow');
var question = document.getElementById('question');var bws = getBrowserHeight();
shadow.style.width = bws.width + 'px';
shadow.style.height = bws.height + 'px';
question.style.left = parseInt((bws.width - 350) / 2)+ 'px';
question.style.top = parseInt((bws.height - 200) / 2)+ 'px';
shadow = null;
question = null;
} function showLayer() {
setLayerPosition();
var shadow = document.getElementById('shadow');
var question = document.getElementById('question');
shadow.style.display = 'block';
question.style.display = 'block';
shadow = null;
question = null;
}
function hideLayer() {
var shadow = document.getElementById('shadow');
var question = document.getElementById('question');
shadow.style.display = 'none';
question.style.display = 'none';
shadow = null;
question = null;
}window.onload=function(){
window.onresize = setLayerPosition;
}
</script>
<iframe id="shadow" class="opaqueLayer" style="border:0;" src="about:blank"></iframe>
<input type="button" value="click" onclick="showLayer();">
<div id="question" style="width:340px;height:250px;padding:0px;display:none;position:absolute;z-index:1001;background:#CCC;border:10px solid #999;">
<img width="320" height="210" src="http://shop.usa.canon.com/wcsstore/eStore/images/sx200is_black_1_xl.jpg"><br>
<input type="button" value="关闭" onclick="hideLayer()">
</div>
<input type=button value="click me" onclick="showFloat()">
<div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px;
width: 800px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%;
margin: -200px 0 0 -400px;">
<div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;">
这里放图片
<br />
<div>
<input id="BttCancel" type="button" value=" 取 消 " onclick="ShowNo()" class="BigButton" />
</div>
</div>
</div>
<input type="hidden" id="pagestate" runat="server" />
</form> <script>
function thisclick(id) {
document.getElementById("cuee").value = id;
}
function ShowNo() {
document.getElementById("divLogin").style.display="none";
}
function showFloat() {
document.getElementById("divLogin").style.display="";
}
</script>放图片的地方放个IMG控件,加个hidden控件来获取图片的路径,然后再在IMG显示就行了