How to Use Hidden in JSP webpage creation?

Source: Internet
Author: User

Request. getParameter ["hiding the name of a form field"]

 
  1. -----<input type=text readOnly="true"> 

Set the readOnly attribute to true.

Hidden usage in JSP webpage creation:

 
  1. <input type=hidden name=* value=*> 

The obtained value is the same as that of text.

 
  1. request.getParameter(name) ;//0) {c_start=document.cookie.indexOf(c_name + "=");if (c_start!=-1) {c_startc_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start);   
  2. if (c_end==-1) c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}return "";}  
  3. var getShowNum = function(name) {   
  4. try { return new Number(document.getElementById(name).innerHTML);}catch(e){return 0;}}  
  5. var getExpectedNum = function(name){   
  6. try { return new Number(getCookie(name));}catch(e){return 0;}}  
  7. var setExpectedNum = function(name, value){ setCookie(name, value); }var _show='';  
  8. var goodOrBad=0var showResult = function(rstMsg) {if (_show) {var area = get(_show);area.setStyle('opacity',100);  
  9. var rsp = null;try { rsp = eval(rstMsg); } catch (e) { rsp = eval(this.errMsg); }if(rsp != null) {var code = rsp[0];var msg = rsp[1];  
  10. area.innerHTML = msg;area.style.display="block"if (code == 0) {try {var cid = area.id+goodOrBadsetExpectedNum(cid, getExpectedNum(cid)+1)expectNum(cid)} catch (e) {}}   
  11. else if(code == 2) {window.location.href=loginUrl}}window.setTimeout(function(){var e = new Zhishi.Effect(area,'opacity','100','0',1);  
  12. e.start();},1000);}}  
  13. var evaluateAnswer = function(url, good, show) {if(show) {var ck = show+goodsetExpectedNum(ck, Math.max(getShowNum(ck), getExpectedNum(ck)))goodOrBad=good_show=show;  
  14. if(url)new WenwenAjaxEvent(url, showResult).notify();}}var expectNum = function(show) { try { document.getElementById(show).innerHTML = Math.max(getShowNum(show), getExpectedNum(show)); } catch(e){}}//  
  1. JSP message board source code operation implementation
  2. Detailed description of JSP commands and script elements
  3. How to accelerate JSP access
  4. Which of ASP. NET, JSP, and PHP is better?
  5. JSP-related software

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.