需要对话框中的文字描述:您选择的产品已放入购物车
2个按钮,
1、文字提示: 继续购物 。(结果是 点击后关闭此页面)
2、文字提示: 去结算。(结果是点击后到指定的网页)谢谢!
2个按钮,
1、文字提示: 继续购物 。(结果是 点击后关闭此页面)
2、文字提示: 去结算。(结果是点击后到指定的网页)谢谢!
解决方案 »
- 小数点移动问题
- 请教一个正则表达式的写法~
- 输入一位数字,第一个div改变底色,输入第二位数字,第二个div跟着变色。。。。如此类推。
- 求一正则表达式:取出<body></body>之间的内容
- 窗口关闭 问题
- 各位大哥大姐,最近遇到一个奇怪的问题,在<TD>中包含<DIV>块,<DIV>块中又包含一个表格,表格内容很多,所以使用DIV来实现上下滚动,但
- 如何用javascript实现一个连动的下拉菜单?
- 请问:如何在IE6中window.open()打开一个新窗口的同时关闭第一个窗口???火急
- window的showModalDialog打开的窗口怎么返回值?
- canvas 拖动矩形边框改变大小
- 关于web使用特殊字体的问题
- 紧急:帮看一下JS错误--“缺少对象”。
if (text=="去结算") {
...
} else {
...
}
}Ext.Msg.show({
msg: '您选择的产品已放入购物车',
buttons: [
{ text: '继续购物' }, { text: '去结算' }
],
fn: myCallbackFunction,
})
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>基于JQuery的JS遮罩层效果</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
function showDiv() {
document.body.style.overflow = 'hidden';
var docHeight = Math.max(document.documentElement.scrollHeight,
document.documentElement.clientHeight);
var docWidth = Math.max(document.documentElement.scrollWidth,
document.documentElement.clientWidth);
var _div = document.createElement('div');
_div.className = 'divClass';
_div.setAttribute('id', 'divId');
document.body.appendChild(_div);
document.getElementById('divId').style.width = docWidth + 'px';
document.getElementById('divId').style.height = docHeight + 'px';
var _divAlert = document.createElement('div');
_divAlert.className = 'divalert';
_divAlert.id = 'divalert';
document.body.appendChild(_divAlert);
document.getElementById('divalert').style.left = (document.documentElement.clientWidth - 200)/2 + 'px';
document.getElementById('divalert').style.top = (document.documentElement.clientHeight - 100)/2 + 'px';
var _divContent = document.createElement('div');
_divContent.id = 'divcontent';
_divAlert.appendChild(_divContent);
var _divbtn = document.createElement('div');
_divbtn.id = 'divbtn';
var _btn = document.createElement('input');
_btn.type = 'button';
_btn.value = '确定';
_btn.id = 'btn';
_divbtn.appendChild(_btn);
_divAlert.appendChild(_divbtn);
document.getElementById('btn').onclick = function() {
document.getElementById('divId').style.display = 'none';
document.getElementById('divalert').style.display = 'none';
document.body.style.overflow = 'auto';
}
}
function resizeDiv() {
var docHeight = Math.max(document.documentElement.scrollHeight,
document.documentElement.clientHeight);
var docWidth = Math.max(document.documentElement.scrollWidth,
document.documentElement.clientWidth);
document.getElementById('divId').style.width = document.documentElement.clientWidth + 'px';
document.getElementById('divId').style.height = document.documentElement.clientHeight + 'px';
}
window.onload = function() {
showDiv();
}
window.onresize = resizeDiv;
</script>
<style type="text/css">
body { margin:0; padding:0; }
.divClass { position:absolute; left:0; top:0; background-color:#ccc; z-index:0; }
.divalert { position:absolute; z-index:2000; width:200px; height:100px; border:1px solid #666; background-color:#fff; }
#divcontent { height:60px; }
#divbtn { height:40px; background-color:#ddd; text-align:center; }
#btn { border:1px solid #000; margin-top:10px; }
</style>
</head>
<body>
<div style='height:1000px;'>fsfs</div>
</body>
</html>修改下即可