JSP annotation record

xiaoxiao2021-03-06  42

========== ing.jsp ====================================================================== # Ffffff ">

Message Board -> Message board
========= =============================================================================================== /Webmodule1/index.jsp>

-> asdfs ======== counter.jsp ============== An inspection refresh Visual number of access counters <% @ Page ContentType = "text / html; charset = BIG5"%> access counter </ title> </ head> <body bgcolor = "black> <br /> <table border = "0" width = "85%" align = "center"> <tr> <td align = "center"> <font size = "7" color = " White> Welcome! Welcome </ font> </ td> </ tr> <trs = "{height: 30}> </ tr> <tr> <td align =" right "> <% string path = Request.getRealPath ("Pages / Counter"); // Request.getRealPath ("xx"), get the root directory / xx / java.io.file f = new java.io.file (Path " //counter.cnt "); if (! f.exists ()) {f.createNewFile (); f = new java.io.file (Path " //counter.cnt ");} java.io.fileReader Fr = new java.io.fileReader (f); java.io.bufferedreader br = new java.io.bufferedreader (fr); string num = null; Num = br.readline (); if (num == null) NUM = "0"; fr.close (); / * If you want to display the digital image for this code for (int i = 0; i <num.length (); i ) { Out.println ("<IMG SRC = '. / Images /" Num.Charat (i) ". GIF> </ img>");} * / out.println ("<font color = /" White / ">" Num "</ font>");</p> <p>Java.io.filewriter fw = new java.io.filewriter (Path "//counter.cnt"); fw.write (Integer.ParSeint (NUM) 1)); fw.close (); %> </ Td> </ tr> </ table> </ body> </ html> ---------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- -------------------------------- ===== Automatic timing refresh ========= ========= <head> <meta content = "20" http-equiv = "refresh" /> </ head> // Each 20 seconds page automatic refresh one suitable for dynamic real-time news === === JSP page transfer Chinese characters garbled problem ===== 1, <% Request.setCharacterencoding ("BIG5");%> 2, new string (Request.getParameter ("message"). getBytes ("ISO8859- 1 ")," BIG5 ") 3, if in Sendredirect, the Chinese: Response.sendRedirect (" GAP0051.JSP? & Function_name = " java.net.urlencoder.Encode (character string variable with Chinese characters)); == === Landing page related =================== If the Buton type is submit, press ENTER to automatically submit, such as: <input type = 'submit' value = 'ok' > Or <Button Type = 'Submit'> OK </ Button>. However, it is often necessary to verify whether it is legal in the OnClik event, and the results are often submitted after verifying that it is not legal to make a warning.</p> <p>Generally, the following method is generally avoided: the button is set to normal button, / / ​​verify function function checkvalue (x) {if (x.trim () <> ') Document.loginform.Submit (); // loginform is the name of Form} // Account box code <input type = "text" name = "textID" id = "textID" size = "20" MAXLENGTH = "10" onkeydown = "javascript: if (event.keycode == 13) Event.KeyCode = 9 "> // ENTER change tab // password box code <input type =" password "name =" textpwd "id =" textpwd "size =" 20 "onkeydown =" javascript: if (Event.Keycode == 13) CheckValue (Document.All.TextID.Value, Document.all.TextPwd.value); "> // Submit button code <input type =" value = "determination" class = "οnclick =" Return CheckValue (document " .all.Textid.value, Document.all.TextPwd.value "> =========== Limit display Table height ====== Table No Height property? <div id = 'scrolldiv' style = 'overflow: auto; width = 100%; Height: 50%> <Table Width =' 150 '> <tr> ... </ tr> <tr> ... </ tr> < / Table> </ div> This is a horizontal and vertical scroll bar, sometimes uses <div> height with <div> height in the window that pops up with Window.Window.ShowModalDialog () is not good to use 50 NUM, just fine ==== ===== iframe ===============================, "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Height = 70%; Background-Color: XXX '> </ iframe> script: window.open ('xx.jsp? parameters = parametersValue', 'DISPIFRAME1', ''); Document.getElementByid ('DISPIFRAME1'). style.diPlay =</p> <p>''; / script Controls the content displayed in IFRAME, or constrained display locations to get the IFRAME in the IFRAME: Document.dipiFrame1.Document.getlementsByName ('x'); ============== == ShowModalDialog window refresh ============================================================================================================================================================</p> <p>ShowModalDialog method Opens window Sometimes the dynamic content will not be updated.</p> <p>Var randomnum = (new date ()). getTime (); // Get random number</p> <p>WINDOW.SHOWMODALDIALOG (xx.jsp? para = val & randomnum) // Along the end, you can make MODALDIALOG to refresh each time.</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-55705.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="55705" 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.040</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 = 'm2xZa1_2FPOxxgRga_2F9BP_2BbMsu41qj2Cd3sR0VV3A1pAdtOzCvGQ6zv1BwfD5_2BTChCNPNXZu_2F4ujcgnKKNWRcf1A_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>