修改 JS Confirmez alerte 提示框文字的简单实例
<! Doctype html> <html> <head lang = "en"> <meta charset = "utf-8"> <style> * {padding: 0; marge: 0;} html {hauteur: 100%; } corps {taille de police: 16px; Font-Family: "Microsoft Yahei"; hauteur: 100%; } H1, H2, H3 {Font-Weight: Light; } a {text-décoration: aucun; } #selfwinsow {largeur: 60%; marge: 0 20%; Contexte: #FFF; Position: fixe; en haut: 35%; bordure: 1px solide #ccc; rembourrage: 0 2% 2% 2%; } #slefclose {width: 25px; hauteur: 25px; Position: Absolute; à droite: 1rem; en haut: 0,4rem; Z-Index: 9999; curseur: pointeur; } #slefclose :: après {position: absolue; Largeur: 30px; hauteur: 30px; Contenu: "×"; taille de police: 2.5rem; hauteur de ligne: 30px; } #selfwinsow H2 {Font-Size: 1Rem; Border-Bottom: 1px solide #ccc; hauteur de ligne: 100%; rembourrage: 1rem 0; } #Selinfo {Font-Size: 0.95Rem; Heureur de ligne: 2.1rem; rembourrage: 0,5rem; } #selfbtbox {padding: 1Rem; marge: 0px automatique; Border: 1px solide #ccc; débordement: caché; } .Selfbt {padding: 0.8rem 2%; arrière-plan: # 323434; Couleur: #FFF; flottant: à gauche; hauteur de ligne: 100%; Texte-aligne: Centre; curseur: pointeur; } .selfbtDouble {largeur: 46%; } .selfbTsingle {Color: #fff; Largeur: 100%; rembourrage: 0,8rem 0; } #Selfok {Background: # 323434; } .selftalKno {float: Left; Position: relative; en haut: -5px; rembourrage: 4px 10px; Affichage: bloc en ligne; marge-gauche: 5px; Couleur: # 000; } .elftalkok {float: à droite; Position: relative; en haut: -5px; Affichage: bloc en ligne; marge droite: 5px; rembourrage: 4px 10px; Couleur: #FFF; } # selfno, # linkto2 {background: #eeeeee; Couleur: # 555555} # selfback {largeur: 100%; Contexte: RGBA (0,0,0, .6); } # selfriNput {display: block; Largeur: 100%; rembourrage: 0,5rem 0; Border: 1px solide #eee; Border-Radius: 3px; marge-fond: 1rem; Text-indent: 0.6rem} # selfriNput: focus {border: 1px solide # 087690; } </ style> <Title> </ title> <script src = "http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"> </ script> <! - <script type = "Text / Javascrip / ** Selfwindow 组建 , 主要是用于模拟移动网站的 alert (), confirm () 窗口点解某一按钮跳转到某一个页面的效果, * 因为给予移动 web , 所以没有兼容低版本 ie * 调用方法 : var win = new selfwinsow ({* types: "confirmer", // 这里可以选择的参数有 , alert, confirmer, confirmer2, lien * ling "Oui", // 自定义确定按钮文字 * selfno: "non", // 自定义否认按钮文字 * Rappel: fn, // 当 types 为 confirmer, confirmer2 或者是 parler 时的回调函数 , confirmer 为模拟 * / var selfwinsow = function (paramètres) {this.init (paramètres)}; selfwinsow.prototype = {init: function (Settings) {this.opts = {Types: "" "" Selfinfo: TypeOf Paramètres == "String"? == null) {this.selfalert ();} else if (settings.types == "Confirme this.selfmobileTalk ();} else {this.selfalert ();}}, // confirme 窗口 selfconfirm: function () {var _This = this; id = 'Sleftitle'> "+ _ this.opts.sleftitle +" <// h2> <p id = 'selinfo'> "+ _ this.opts.selfrinfo +" <// p> <div id = 'seigne selfbtdouble '> "+ _ this.opts.selfno +" <// div> <// div> "; this.createmask (html); this.selsevents ();}, // alert 窗口 selfalerlert: function () {var _this = this; var html =" <div id =' selfwinsow '> <v id =' sndclose '> <// div>' selfwinsow '> <v id =' sndclose '> <// Self> <h2'> <v id = 'swefclose'> id = 'lisetle'> "+ _ this.opts.sleftitle +" <// h2> <p id = 'selinfo'> "+ _ this.opts.selfrinfo +" <// p> <div id = 'setalin' class = 'selfbt selfbtsingle'> "+ _ this.opts.sellok +" </div> <// div> "; this.createmask (html); id = 'selinfo'> "+ _ this.opts.selfrinfo +" <// p> <div id = 'seglok' class = 'selfbt selfbtings'> "+ _ this.opts.selfok +" <// div> <// div> "; this.createmask (html); this.selfants = this;}, // 带链接窗口 selflink: fonction () {var _thisS = this; var html = "<div id = 'selfwinsow'> <div id = 'slefclose'> <// div> <h2 id = 'lisetle'>" + _ this.opts.sleftitle + "<// h2> <p id = 'selinfo'>" + _ this.opts.selfo + "<// p> <a id = '' href = '"+ _ this.opts.linkto1 +"' class = 'selfbt selfbtdouble'> "+ _ this.opts.selfok +" <// a> <a id = 'linkto2' href = '"+ _ this.opts.linkto2 +"' class = 'selfbt =' selfbtdouble '> "+ _ this.opts.selfno +" <// div> <// div> "; this.createmask (html); this.selsevents ();}, selfmobiletalk: function () {var _this = this; var html =" <div id =' selfwinsow ' Style = 'Width: 100%; marge: 0px; top: 0; gauche: 0; padding: 0; Class = 'selftalkno'> "+ _ this.opts.selfno +" <// span> "+ _ this.opts.sleftle +" <b id = 'sel -k' style = 'background: #fff; color: # ff0028; cursor: pointer;' Style = 'Largeur: 90%; Selfback.style.BackgroundColor = "# EEE"; this.opts.types; _This.SellRemoveback ();} else if (type == "Confirmer" || Document.AdDeventListener (Click ', sel-amen, false); Selfback.style.top = "0", selfback.style.left = "0", selfback.style.Right = "0", selfback.style.innerhtml = html. _This = this; document.addeventListener ('click', fonction (e) {var e = e || window.event; var el = e.screment || e.target; if (el.id == "Slefclose") {if (_this.opts.callback) {_This.opts.callback = fonction () {}; return; "Img") {if (_This.opts.callback) {_This.opts.callback = function () {}; Document.Body Ord1 = document.getElementyid (rd1 "); if (objText.Indexof (TextArea ")> -1) {return objText.value;} else {return objTexte. Otext.disabled = true; }}} Ord1.onclick = fonction () {si. E.AddeventListener (Type, function () {if (e.id == 'rd2') {Target.Disabled = false; var selfonfirm = new Selfinfo: {Sleftle: "Option Conseils pour l'utilisateur", Types: "Confirmer", Selfinfo: Typeof Settings == "String"? "Page de chargement de dos", function () {}}); if (target.disabled == false && len == 0) {var selfconfirm = new selfwinsow ({Sleftitle: "Option conseils pour l'utilisateur", types: "Alert", Selfo: Typeof Paramètres == "STRAGE"? if (e.attachevent) {e.attachevent ('on' + 'type', function () {if (e.id == 'rd2') {target.disabled = false; var selfonfirm = new selfwinsow ({types: "confirmer", callback: function () {}});} else if (e.id == 'rd1') {target.inneriex = '; ''; Target.TextContent = ""; Paramètres == "String"? </script></head><body> <form action="" method="get"> <input id="rd1" form="btn" type="radio" value="11111" name="radio" checked=true>first time purchase<br/><br/> <section style="float:left;"> <input id="rd2" form="btn" type="radio" value="22222" name="radio" > Offre alternative (s): </ section> <section style = "float: gauche; marge: 10px 10px"> <textarea id = "text" form = "btn" cols = "30" Rows = "7" maxLength = "100"> </ textarea> </ section> </ form> <foetrer style = "clairement: float: reight; margin-right: 10%;" ". name = "btn" type = "soumi" value = "Suivant"> </footer> </ body> </html>以上这篇修改 js confirment l'alerte 提示框文字的简单实例就是小编分享给大家的全部内容了 , 希望能给大家一个参考 , 也希望大家多多支持武林网。