修改 JS konfirmasi peringatan 提示框文字的简单实例
<! Doctype html> <html> <head lang = "en"> <meta charset = "utf-8"> <tyle> *{padding: 0; margin: 0;} html {tinggi: 100%; } body {font-size: 16px; Font-Family: "Microsoft Yahei"; Tinggi: 100%; } h1, h2, h3 {font-weight: lebih ringan; } A {Text-Decoration: None; } #selfwinsow {width: 60%; Margin: 0 20%; Latar belakang: #FFF; Posisi: diperbaiki; atas: 35%; perbatasan: 1px solid #ccc; Padding: 0 2% 2% 2%; } #slefclose {width: 25px; Tinggi: 25px; Posisi: Absolute; Right: 1Rem; Atas: 0.4rem; z-index: 9999; kursor: pointer; } #slefclose :: After {position: absolute; Lebar: 30px; Tinggi: 30px; Konten: "×"; Ukuran font: 2.5rem; Line-Height: 30px; } #selfwinsow h2 {font-size: 1rem; Border-Bottom: 1px solid #CCC; Line-Height: 100%; padding: 1rem 0; } #selinfo {font-size: 0.95rem; Line-Height: 2.1Rem; padding: 0,5rem; } #selfbtbox {padding: 1rem; margin: 0px auto; Perbatasan: 1px solid #ccc; meluap: tersembunyi; } .selfbt {padding: 0.8rem 2%; latar belakang: #323434; Warna: #fff; float: kiri; Line-Height: 100%; Teks-Align: tengah; kursor: pointer; } .SelfBtDouble {width: 46%; } .selfbtsingle {color: #fff; Lebar: 100%; Padding: 0.8rem 0; } #selfok {latar belakang: #323434; } .selftalkno {float: left; Posisi: kerabat; Atas: -5px; padding: 4px 10px; Tampilan: blok inline; margin-kiri: 5px; Warna: #000; } .selftalkok {float: right; Posisi: kerabat; Atas: -5px; Tampilan: blok inline; margin-kanan: 5px; padding: 4px 10px; Warna: #fff; } #selfno, #linkto2 {latar belakang: #eeeeee; Warna: #555555} #selfback {width: 100%; Latar Belakang: RGBA (0,0,0, .6); } #selfInput {display: block; Lebar: 100%; Padding: 0.5rem 0; Perbatasan: 1px solid #eee; Border-Radius: 3px; margin-bottom: 1rem; Text-Indent: 0.6Rem} #SelfInput: Focus {Border: 1px Solid #087690; } </style> <title></title> <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <!--<script type="text/javascript" src="SelfWindow.js"></script>--> <script> /** SelfWindow 组建 , 主要是用于模拟移动网站的 主要是用于模拟移动网站的 主要是用于模拟移动网站的 主要是用于模拟移动网站的 主要是用于模拟移动网站的 , , , , , , , , , 所以没有兼容低版本 所以没有兼容低版本 所以没有兼容低版本 所以没有兼容低版本 调用方法 调用方法 调用方法 调用方法 调用方法 调用方法 调用方法 调用方法 调用方法 , 这里可以选择的参数有 这里可以选择的参数有 这里可以选择的参数有 弹窗信息 弹窗信息 弹窗信息 弹窗信息 弹窗信息 弹窗信息 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , "YES",//自定义确定按钮文字* selfNo : "NO",//自定义否认按钮文字* callback:fn,//当types为confirm,confirm2或者是talk时的回调函数,confirm为模拟 */var SelfWinsow = function(settings){this.init(settings)};SelfWinsow.prototype = { init:function(settings){ this.opts = { types : "", slefTitle : "", Selfinfo: Pengaturan Tipe == "String"? == NULL) {this.selfAlert (); if (settings.types == "Talk") {this.selfmobileTalk () id = 'sleftitle'> "+_ this.opts.sleftitle+" <// h2> <p id = 'selinfo'> "+_ this.opts.selfinfo+" <// p> <div id = 'selfoK' class = 'selfbt elfbtDouble'> "+_ ini. SelfBtDouble '> "+_ this.opts.selfno+" <// div> <// div> "; this.createMask (html); this.selfevents ();}, // waspada 窗口 selfalert: function () {var _this = this; var html =" <Div ID =' id = 'sleftitle'> "+_ this.opts.sleftitle+" <// h2> <p id = 'selinfo'> "+_ this.opts.selfinfo+" <// p> <div id = 'selfok' class = 'selfbtsingle'> ">"+_ ini. this.createMask (html); id = 'selInfo'> "+_ this.opts.selfinfo+" <// p> <div id = 'selfok' class = 'selfbt selfbtsingle'> "+_ this.opts.selfok+" <// div> <// div> "; this.createMask (html); ini sendiri (); {带链接窗口 {带链接窗口 {带链接窗口 { ini; 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.selfevents ();}, selfmobileTalk: function () {var _this = var html =" <div id =' selfwinsow ' style = 'Width: 100%; margin: 0px; atas: 0; kiri: 0; Padding: 0; class = 'selftalkno'> "+_ this.opts.selfno+" <// span> "+_ this.opts.sleftitle+" <b id = 'selfok' style = 'latar belakang: #fff; color:#ff0028; Cursor: pointer; Style = 'Width: 90%; Selfback.Style.BackgroundColor = "#EEE"; This.opts.types; _THIS.SelfRemoveback (); Document.removeEventListener ('klik', selfokfun, false); = Selfback "; }, // 关闭按钮事件 slefclose: function () {var _this = this; function () {}; if (el.id == "selfno" || el.tagname == "img") {if (_this.opts.callback) {_this.opts.callback = function () {} _} {} {} {} {} {} {} {} {{ini sendiri. coba {var selfback = document.geteLementById ('selfback') document.body.removechild (selfback); } </script> window.onload = function () {var ord1 = document.geteLementById ("rd1"); fungsi (objtext) { /*if (browser == 'netscape') {if (objtext.indexof ("textarea")> -1) {return objtext.value}} {returner}} {}}} {}} {} {} {} {{microsoft objtext.value;} var text = getText (OTEXT); }; aadevent = function (e, type, target) {e = e || window.e; = "string"? } lain jika (E.ID == 'btn') {var text = getText (target); Pelanggan ", selfok:" ok ", callback: function () {}});}}}, false);} lain jika (e.attachevent) {e.attachevent ('on'+'type', function () {if (e.id == 'rd2') {target.disabled = false; var false = need = need = need = need = neew need = {lewoelfor (e.id == 'rd2') {target.disabled = false; var false; Callback () {}}); && len 0) {var selfConfirm = selfwinsow baru ({sleftitle: "Tips opsi untuk pengguna", tipe: "waspada", selfinfo: typeOf pengaturan == "string"? 'Klik', Otext); <Section style = "float: left;"> <input id = "rd2" Form = "btn" type = "Radio" value = "22222" name = "Radio"> Alternatif (s) Penawaran: </section> <bagian style = "float: left; margin: 10px 10px"> <textarea id = "teks" btn "btn": 10px 10px "> <textarea id =" teks "btn" btn " maxlength = "100"> </pextarea> </sticle> </form> <footer style = "clear: keduanya; float: kanan; margin-kanan: 10%;"> <input id = "btn" name = "btn" type = "kirim" value = "next"> </footer> </body> </html>以上这篇修改 JS konfirmasi peringatan 提示框文字的简单实例就是小编分享给大家的全部内容了 , 希望能给大家一个参考 , ,