Time input control in BS structure

xiaoxiao2021-03-06  80

test timecontrol </ title> </ head> <script language = "javascript"> //written by CloudChen, 2004/03/15 @Name: Masteric: Time control name, self Definition, not repeat @Forobj: Must: Dialog data item control name, no repeat @fname: optional: Time control components, no repeat // Last Modfiy by farmers (191301587@163.com) September 7, 2004 19: 01: 02Function TimeControl (name, forobj, fname) {this.name = name; this.fname = fname || "mctr_input _" this.name; this.timer = null; this.fobj = null; this.tostring = function () {var objdate = new date (); // var sminute_common = "class = /" mctr_input / "maxlength = /" 2 / "name = /" " this.fname " / "οNFCUS = /" this.name ". setfocusobj (this) /" οnblur = / " this.name ". settime (this) / "οnkeyup = /" " this.name ". prevent (this) / "οNKEYPRESS = /" if (! / [0-9] /. test (string.fromcharcode)) Event.keycode = 0 / " " οnpaste = / "Return False /" οNDRAGENTER = / "Return False /" style = / "IME-mode: disabled /" onpropertychange = / "" this.name ". setforobjvalue () /"; // var sbutton_common = "class = /" mctr_arrow / "οnfοcus = / "THIS.BLUR () /" οnmοuseup = / "" THIS.NA ME ". ControlTime () /" disabled "; var str =" "; str =" <style type = / "text / css /"> "str =" .mctr_frameborder {"str =" border-left: 1PX INSET # D4D0C8; "Str =" Border-Top: 1px INSET # D4D0C8; "Str =</p> <p>"Border-Right: 1PX INSET # D4D0C8;" Str = "border-bottom: 1px INSET # D4D0C8;" Str = "Width: 130px;" Str = "Height: 20px;" Str = "Background-Color : #Ffffff; "str =" overflow: hidden; "str =" text-align: left; "// text-align: right; str =" Vertical-align: text-top; "str =" Font-family: / "tahoma /"; "str =" font-size: 14px; "str ="} "str =" .mctr_arrow {"str =" width: 16px; "Str =" Height : 10px; "Str =" font-family: / "webdings /"; "str =" font-size: 9px; "str =" line-height: 2px; "Str =" Background-Color: # Fffffff; "Str =" padding-left: 2px; "Str =" Cursor: default; "str ="} "str =" .mctr_table {"str =" padding-top: 0px; "Str = "Padding-right: 0px;" str = "padding-bottom: 0px;" str = "padding-left: 0px;" str = "}" str = ".mctr_input {" str = "width : 18px; "Str =" height: 16px; "str =" border: 0px solid black; "str =" font-size: 12px; "str =" text-align: Right; "Str =" Background-colo R: Transparent; "Str ="} "Str =" </ style> "; str =" <table border = / "0 /" cellspacing = / "0 /" cellpadding = / "</p> <p>0 / "Class = /" mctr_table / ">" Str = "<trilas = /" mctr_table / ">" Str = "<TD class = /" mctr_table / "> STR =" <span class = / "mctr_frameborder /"> "Str =" <input radix = / "24 /" value = / "" " this.formattime (objdate.getHours ()) " " sminute_common ">: "Str = <Input Radix = / "60 /" Value = / "" this.formattime (objdate.getminutes ()) "/" " sminute_common ">: "Str =" <input radix = / "60 /" Value = / "" this.formattime (objdate.getSeconds ()) "/" " sminute_common "> "Str =" </ span> "Str =" </ td> "Str =" <TD Class = / "mctr_table /"> "str =" <table border = / "0 /" cellspacing = / "0 /" cellpadding = / "0 /" class = / "mctr_table /"> "Str =" < Tr class = / "mctr_table /"> <td class = / "mctr_table /"> <button id = / "" this.fname "_ UP /" sbutton_common "> 5 </ button> </ td> </ Tr> "Str =" <trilas = / "mctr_table /"> <td class = / "mctr_table /"> <button id = / "" this.fname "_ down /" sbutton_common "> 6 </ Button> </ td> </ tr> "Str =" </ Table> "Str =" </ td> "Str =" <TD> "STR </p> <p>= "<input type = /" text / "name = /" " forobj " / "id = /" " forobj " / "value = /" this.getnowtime () "/" style = / " Display: 'None' / ">" Str = "</ TD>" Str = "</ TD>" STR = "</ TABLE>" Return Str;} this.getnowtime = function () {var objdate = New Date (); returnid.formattime (objdate.GetHours ()) ":" this.form ()) ":" this.formattime (Objdate.GetSeconds ();} this .play = function () {this.timer = setInterval (this.name ". Playback ()", 1000);} this.formattime = function (stime) {stime = ("0" stime); return stime.substr (stime.length-2);} this.Playback = function () {var objdate = new date (); var arrdate = [objdate.getSeconds (), objdate.getSeconds (), objdate.getseconds ()]; var objminute = Document.GtelementSbyName (this.fname); for (var i = 0; i <objminute.Length; i ) {objminute [i] .value = this.formattime (arrdate [i])}} this.setForobjValue = function ( ) {EVal ("Document.all." Forobj ". Value = this.gettime ()");} this.prevent = function (obj) {ClearInterval (this.timer); THISSETFOCUSOBJ (OBJ); var value = parseint (obj.value, 10); var radix = parseint (obj.radix, 10) -1; if (obj.value> radix || obj.value <0) {OBJ .value = obj.value.substr (0,1);}} this.controltime = function (cmd) {Event.cancelbubble = true; if (! this.fobj) return; clearinterval (this.timer); var cmd = Event.srcelement.innertext == "5"? True: false;</p> <p>VAR i = parseint (this.fobj.value, 10); var radix = parseint (this.fobj.radix, 10) -1; if (i == radix && cmd) {i = 0;} else if (i == 0 && ! cmd) {i = radix;} else {cmd? i : i-;} this.fobj.Value = this.formattime (i); this.fobj.select ();} this.settime = function (OBJ) {Obj.Value = this.formattime (obj.value);} this.setfocusobj = function (obj) {EVAL ("document.all." This.fname "_ up"). Disabled = evAl ("Document.all. " this.fname " _ DOWN "). Disabled = false; this.fobj = obj;} this.gettime = function () {var arrtime = new array (2); for (var i = 0; i <document.getlementsByname (this.fname) .length; i ) {Arrtime [i] = document.GtelementsByname (this.fname) [i] .value;} return arrtime.join (":")} this.setinitcontrol = function () {var Itime = evAl ("Document.all." forobj ". Value"; var arrtime = new array (); arrtime = str2Array (Itime, ":"); for (var i = 0; i <arrtime.length; i ) {document.getlementsByname (this.fname) [i] .Value = arrtime [i];}}} // The string STR is subjected to a string CH split generate an array Function Str2Array (STR, CH) {VAR A = new array (); var i = 0, j = -1, k = 0; while (i <str.length) {j = str.indexof (CH, J 1); if (j! = - 1 ) {IF (j == 0) {a [k] = "";} else {a [k] = str.substring (i, j);} i = j 1;} else {a [k] = Str.SUBSTRING (I, Str.Length); i = str.Length;} k ;} return a;} </ script> <body> <script language = "javascript"> <! - var datectrl = new timeControl "datectrl", "txtdatee"); document.write (datectrl); // -> <</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-123166.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="123166" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.049</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'XDZXmG_2B2Ht70Za3BlypMYU4bA8zx4MbbCt1ufgIv4OzppBPiP_2BPL618i0W7rk_2BFknIbBZCru146m8kbUVlYmhg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>