修改js confirm alert 提示框文字的简单实例Word文件下载.docx
《修改js confirm alert 提示框文字的简单实例Word文件下载.docx》由会员分享,可在线阅读,更多相关《修改js confirm alert 提示框文字的简单实例Word文件下载.docx(10页珍藏版)》请在冰豆网上搜索。
![修改js confirm alert 提示框文字的简单实例Word文件下载.docx](https://file1.bdocx.com/fileroot1/2022-10/8/7dd7c52f-a200-462a-8669-c8fb788bda6d/7dd7c52f-a200-462a-8669-c8fb788bda6d1.gif)
font-size:
16px;
font-family:
"
MicrosoftYahei"
;
h1,h2,h3{
font-weight:
lighter;
a{
text-decoration:
none;
#selfWinsow{
width:
60%;
020%;
background:
#fff;
position:
fixed;
top:
35%;
border:
1pxsolid#ccc;
padding:
02%2%2%;
#slefClose{
25px;
absolute;
right:
1rem;
top:
0.4rem;
z-index:
9999;
cursor:
pointer;
#slefClose:
:
after{
30px;
content:
×
"
2.5rem;
line-height:
#selfWinsowh2{
border-bottom:
1rem0;
#selInfo{
0.95rem;
2.1rem;
0.5rem;
#selfBtBox{
0pxauto;
border:
overflow:
hidden;
.selfBt{
0.8rem2%;
background:
#323434;
color:
float:
left;
text-align:
center;
.selfBtDouble{
46%;
.selfBtSingle{
0.8rem0;
#selfOk{
.selftalkNo{
relative;
-5px;
4px10px;
display:
inline-block;
margin-left:
5px;
#000;
.selftalkOk{
right;
margin-right:
#selfNo,#linkTo2{
#eeeeee;
#555555
#selfBack{
rgba(0,0,0,.6);
#selfInput{
block;
0.5rem0;
1pxsolid#eee;
border-radius:
3px;
margin-bottom:
text-indent:
0.6rem
#selfInput:
focus{
1pxsolid#087690;
/style
title/title
scriptsrc="
--scripttype="
text/javascript"
src="
SelfWindow.js"
/script--
script
/*
*selfWindow组建,主要是用于模拟移动网站的alert(),confirm()窗口点解某一按钮跳转到某一个页面的效果,
*因为给予移动web,所以没有兼容低版本ie
*调用方法:
varwin=newSelfWinsow({
*types:
confirm"
//这里可以选择的参数有,alert,confirm,confirm2,link
*slefTitle:
香送网温馨提示"
//弹窗标题
*selfInfo:
Areyoureallytoremovethistool?
//弹窗信息
*selfOk:
YES"
//自定义确定按钮文字
*selfNo:
NO"
//自定义否认按钮文字
*callback:
fn,//当types为confirm,confirm2或者是talk时的回调函数,confirm为模拟
*/
varSelfWinsow=function(settings){this.init(settings)};
SelfWinsow.prototype={
init:
function(settings){
this.opts={
types:
slefTitle:
selfInfo:
typeofsettings=="
string"
?
settings:
ifhaveanyincorrect,andyouwillcontinue?
selfOk:
continueoperatorthedeposit"
selfNo:
backloadingpage"
};
this.setting(settings);
if(typeofsettings=="
){
this.opts.selfInfo==settings;
if(settings=="
||settings==undefined||settings==null){
this.selfAlert();
}elseif(settings.types=="
this.selfConfirm();
confirm2"
this.selfConfirm2();
link"
this.selfLink();
}elseif(settings.types=="
talk"
this.selfMobileTalk();
}else{
},
//confirm窗口
selfConfirm:
function(){
var_this=this;
varhtml="
divid='
selfWinsow'
slefClose'
\/divh2id='
slefTitle'
+_this.opts.slefTitle+"
\/h2pid='
selInfo'
+_this.opts.selfInfo+"
\/pdivid='
selfOk'
class='
selfBtselfBtDouble'
+_this.opts.selfOk+"
\/divdivid='
selfNo'
+_this.opts.selfNo+"
\/div\/div"
this.createMask(html);
this.selfEvents();
//alert窗口
selfAlert:
selfBtselfBtSingle'
selfConfirm2:
//带链接窗口
selfLink:
\/paid='
href='
+_this.opts.linkTo1+"
'
\/aaid='
linkTo2'
+_this.opts.linkTo2+"