Editable drop menu

xiaoxiao2021-03-06  51

<% @ Taglib Uri = "/ Web-INF / STRUTS-TILES.TLD" prefix = "tiles"%> <% @ Taglib URI = "/ Web-inf / struts-nested.tld" prefix = "nested"%> <% @ Taglib URI = "/ Web-INF / STRUTS-LOGIC.TLD" prefix = "Logic"%> <% @ Taglib URI = "/ Web-INF / STRUTS-TEMPLATE.TLD" prefix = "Template"%> <% @ Taglib URI = "/ Web-INF / STRUTS-Bean.TLD" prefix = "bean"%> <% @ Taglib URI = "/ Web-INF / STRUTS-HTML.TLD" prefix = "html"%> <% @ page contenttype = "text / html; charset = GBK"%>

</ title> <html: base /> </ head> <body οnlοad = "ComboBox ()> <html: form action = "Comboaction.do" method = "post"> <select id = "meizzboBoxid" name = "select"> <option> Combo Box </ option> <option value = "11"> 疏 清 清/ Option> <option value = "22"> Dark fragrance floating month 黄 </ option> <option value = "33"> Mei Xunxiao three-pointer </ option> <option value = "44"> Snow lost一 香 </ option> <option value = "55"> Plum Fragrance from bitter cold </ option> </ select> <br /> <input type = "submit" value = "submit" /> </ html: Form> </ body> </ html: html></p> <p>! <SCRIPT LANGUAGE = "JavaScript"> <- function comboBox () {combox = new MeizzComboBox ();} function MeizzComboBox () {// Author: meizz (Plum snow) meizz@hzcnc.com this.object = getObjectById ( "MeizzComboBoxID"); this.input = document.createElement ( "input"); this.div = document.createElement ( "div"); document.body.appendChild (this.input); document.body.appendChild (this. Div); this.ss = this.object.style; this.is = this.input.style; this.ds = this.div.style; this.FontSize = this.ss.fontsize = this.ds.fontsize = "12px"; this.is.position = this.ss.position = this.ds.position = "absolute"; this.top = getObjecttop (this.object); this.Ost = getObjectLeft (this.object); this.object); this.object); this.object); this.Object .width = this.object.clientWidth; this.height = this.object.clientHeight; this.ds.border = "1px solid # 000000"; this.ds.display = "none"; this.ds.color = "# 000000 "; this.ds.Overflow =" auto "; this.ds.Overflowx =" hidden "; this.ds.padding =" 2 0 8 0 " This.is.cursor = "default"; this.is.Borderright = "0px"; this.ds.backgroundColor = "#fffff";</p> <p>This.istop = this.top; this.ds.top = this.top this.height; this.is.left = this.ds.LEFT = this.left; this.s.width = this.width- 18; this.ds.width = this.width; this.ss.clip = "RECT (0" this.width "" this.Height " this.is.width ") ";</p> <p>this.inputIndex = this.object.selectedIndex; this.input.value = this.object.options [this.object.selectedIndex] .text; this.inputValue = this.object.options [this.object.selectedIndex] .value; THIS.CADIDATEVALUE = "" / 条 = 选 点 点 点 点 点 点 点 点 点 点 点 点 点 点 点 点 点 点 点;;;;;;;;;; -1; // Current focus item of the candidate THIS.CLIENTINPUT = ""; // This variable is used to record the user's input content this.candidateelect = false; // Judgment whether the current is selected this.candidateHeight = 118; // Candidate display height value</p> <p>this.object.onchange = comboxSelectChange; this.object.onclick = comboxSelectChange; this.input.onblur = comboxInputBlur; this.input.onkeydown = comboxInputKeyDown; this.div.onscroll = comboxDivScrolling; this.div.onmousedown = comboxDivScrolling; this. Div.onblur = Comboxdivhidden; Function Comboxdivscrolling () {combox.candidateselect = true;} Function String.Prototype.trim () {Return this.Replace (/ (^ / s *) | (/ s * $) | / g, "");} function getObjectByid (ID) {if (arguments.length == 0) Return null; / * @ cc_on @ * / / * @ IF (@_jscript_version> = 3) Return Document.All (ID ); @end @ * / try {return document;} catch (e) {returnval (id);}} function getObjectLEFT (E) {var l = E.Offsetleft; while (e = e. OffsetParent) L = E.OffsetLeft; Return L;} Function getObjecttop (e) {var t = E.OffSettop; while (e = E.OffSetParent) T = E.OffSettop; Return T;} Function setcomboxclip ()} Combox.width = combox.object.clientwidth; combox.is.width = Combox.width-18; Combox.ds.width = Combox.Width; Combox.ss.clip = "Rect (0" combox.width "" ComboX.Height "" ComboX.ss.Width ")"; Combox.ss.Left = Combox.Left 1; // This changeable Select's CLIP property must select SETIMEOUT ("Combox.ss.Ss.Ss.ss = Combox.Left;");} Function ComboXSelectChange () {Combox.inputIndex = Combox.Object. selectedIndex; combox.input.value = combox.object.options [combox.object.selectedIndex] .text; combox.inputValue = combox.object.options [combox.object.selectedIndex] .value; combox.input.select ();</p> <p>} function comboxinputblur () {var A = Combox.object.Options, bb = true; for (var i = 0; i <a.Length; i ) {if (combox.input.value.trim () == a [ I] .text) {bb = false; break;}} f (combox.input.value.trim ()! = "&& bb &&! combox.candidateelect) {Combox.inputValue = Combox.clientInput; Combox.inputIndex = A.Length; a.add (new option (combox.clientInput); Combox.Object.Options [combox.inputindex] .selected = true; settimeout ("setcomboxclip ()");} if (! ? .candidateSelect) comboxDivHidden ();} function comboxDivMouseover (obj) {var e = obj obj: window.event.srcElement; e.style.background = "highlight"; e.style.color = "highlighttext"; combox.candidateSelect = True; for (var i = 0; i <combox.div.children.length; i ) IF (combox.div.children [i] == e) Combox.diVindex = i; combox.candidatefocus = E; Combox. InputIndex = parseint (E.ID.SUBSTR (17)); combox.candidatetext = combox.object.Options [combox.inputindex] .text; combox.candidatevalue = Combo X.Object.Options [combox.inputindex] .value;} function comboxdivouseout (obj) {var e = Obj? Obj: window.event.srcelement; e.style.Background = "#ffffff"; E.Style.color = "# 000000"; combox.candidateSelect = false; combox.candidateFocus = null; combox.candidateValue = ""; combox.candidateText = "";} function comboxDivClick () {if (combox.candidateSelect) {combox.input.value = Combox.candidateText; Combox.inputValue = Combox.candidateValue;</p> <p>combox.object.options [combox.inputIndex] .selected = true; combox.input.select (); comboxDivHidden ();}} function comboxDivHidden () {for (var i = combox.div.children.length-1; i > = 0; I -) Combox.div.removechild (Combox.div.children [i]); combox.candidateelect = false; combox.candidatefocus = null; combox.candidatevalue = "; combox.candidatetext ="; Combox.ds.dex = -1; combox.ds.height = 0; combox.ds.display = "none";} function comboxinputkeyDown () {switch (window.event.keycode) {Case 40: ComboxdivArrow (40); break; case 38: comboxDivArrow (38); break; case 13: comboxDivClick (combox.candidateFocus); break; default: setTimeout ( "combox.clientInput = combox.input.value; comboxDivChildren ()"); break;}} function comboxDivChildren ( ) {Var s = combox.input.Value, d = null, a = combox.object.Options; var divstyle = "font-size: 12px; padding: 2 1 0 2; color: # 000000; cursor: default VAR Sameness = false; comboxdivhidden (); if (s! = "") {For (var i = 0; i <a.length; i ) {if (a [i] .text.trim (). Indexof (s) == 0) {IF (a [i] .Text.trim. ) == s) Sameness = true;</p> <p>D = Document.createElement ("div"); D.Style.csstext = divStyle; D.Id = "comboxdivchildren" i; d.innertext = a [i] .text; d.onclick = comboxdivclick; d.onmouseover = ComboxdivMouseOver; D.onMouseout = ComboxdivMouseout; Combox.div.Appendchild (D); D = null;}} if (Combox.div.children.LENGTH> 0 &&! (Sameness && Combox.div.children.Length == 1) ) combox.DS.display = ""; if (combox.div.clientHeight> combox.candidateHeight) combox.DS.height = combox.candidateHeight;}} function comboxDivArrow (num) {var a = combox.div.children; if (a.length == 0) Return; IF (Combox.candidatefocus! = null) Comboxdivouseout; if (Num == 40) // Turkist candidate {IF (Combox.divIndex <0) Combox.divindex = 0; Else IF (A.Length-1)) {Combox.input.Value = Combox.clientInput; Combox.diVindex = -1;} else Combox.diVindex ;} else {ix (Combox.divindex <0) Comb ox.divindex = a.length-1; else if (combox.divindex == 0) {Combox.input.Value = Combox.clientInput; combox.divindex = -1;} else combox.divindex -;} if (Combox) .divIndex> = 0) {combox.candidateSelect = true; combox.candidateFocus = a [combox.divIndex]; combox.inputIndex = parseInt (combox.candidateFocus.id.substr (17)); combox.input.value = combox. CandidateText = Combox.Object.Options [combox.inputindex] .text; combox.inputValue = Combox.Object.Options [combox.inputindex] .value;</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-115891.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="115891" 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.047</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 = 'MZP5vgnBgKUmln_2Fqj8QoJPUeGTT24m5Yf20V6BwU20MHeJ5I1mzodNvRhnscQG7zs1abGzjRsW8WkY26ihNqOA_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>