JS 怎么用JS弹出一个含我 “是”,“否”,“取消”,按钮的消息框、 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 自己实现吧,js本身不自带,只能自己写一个弹出消息框或者用一些现有的框架实现,如:jquery UI,ymPrompt 等 confirm("确定?");可以自己用div模拟. js自带这的return confirm("确定?").如果要实现你说的那功能自己写吧,可以弹出一个iframe挡住整个页面。 Ext的window的那套样式 LZ可以在firebug下扒下来瞅瞅 建议直接使用ext。都封装好了,学会了很方便。 <!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><title></title><script type="text/javascript">function show(){var div1 = document.createElement("div");div1.style.cssText = "position:absolute;width:200px;height:100px;background-color:#ddeeff";var btn1 = document.createElement("input");btn1.style.cssText = "margin-left:30px;margin-top:30px;";btn1.type = "button";btn1.value = "是";btn1.onclick = function(){alert("是");document.body.removeChild(div1);}var btn2 = document.createElement("input");btn2.style.cssText = "margin-left:30px;margin-top:30px;";btn2.type = "button";btn2.value = "否";btn2.onclick = function(){alert("否");document.body.removeChild(div1);} var btn3 = document.createElement("input");btn3.style.cssText = "margin-left:30px;margin-top:30px;";btn3.type = "button";btn3.value = "取消";btn3.onclick = function(){document.body.removeChild(div1);}div1.appendChild(btn1);div1.appendChild(btn2);div1.appendChild(btn3);document.body.appendChild(div1);}</script></head><body><input type="button" value="出来" onclick="show();"/></body></html> ext做内网很不错,外网的话就算了,还是js好 得到图片的新顺序并写在新数组里,用JS如何实现呢?有源码 js判断日期相差六个月 请教如何让输入框的输入焦点失效? 怎么获得某个网站的比如meta标签的内容 js赋值问题 如何改变XML树中选中节点的背景颜色? 希望在整个WEB组内置顶!致 Bindows 的中文开发者 如何在当前网页上播放wav文件??详情请入内 崩溃,checkbox 不能即时监听了? JS如何实现Li循环切换颜色 javascript中的setTimeout方法参数中的方法中的参数怎样放入对象数组呢? 像搜狐校友录照片中的标记那样,光标放到图片上,图片的所有标记都同时显示出来怎么实现的啊?请高手帮忙
可以自己用div模拟.
<!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>
<title></title>
<script type="text/javascript">
function show(){var div1 = document.createElement("div");
div1.style.cssText = "position:absolute;width:200px;height:100px;background-color:#ddeeff";
var btn1 = document.createElement("input");
btn1.style.cssText = "margin-left:30px;margin-top:30px;";
btn1.type = "button";
btn1.value = "是";
btn1.onclick = function(){
alert("是");
document.body.removeChild(div1);
}
var btn2 = document.createElement("input");
btn2.style.cssText = "margin-left:30px;margin-top:30px;";
btn2.type = "button";
btn2.value = "否";
btn2.onclick = function(){
alert("否");
document.body.removeChild(div1);
}
var btn3 = document.createElement("input");
btn3.style.cssText = "margin-left:30px;margin-top:30px;";
btn3.type = "button";
btn3.value = "取消";
btn3.onclick = function(){
document.body.removeChild(div1);
}div1.appendChild(btn1);
div1.appendChild(btn2);
div1.appendChild(btn3);
document.body.appendChild(div1);
}
</script>
</head>
<body>
<input type="button" value="出来" onclick="show();"/>
</body>
</html>