On the interface of the explicit button and the JSP page data transfer to make the page's label read-only

Source: Internet
Author: User

The display of the interface button hides the lock of the interface input
function Change () {
document.getElementById (' First1 '). style.display= "inline";
document.getElementById (' First2 '). style.display= "inline";
document.getElementById (' First3 '). style.display= "inline";
document.getElementById (' Second2 '). style.display= "None";
document.getElementById (' Second1 '). style.display= "None";
var memberlevelid = $ (' #memberLevelId '). Val ();
var Roleid = $ (' #roleId '). Val ();//disabled would be data failure. To get the data out.
var Branchtid = $ (' #branchtId '). Val ();
var productId = $ (' #productId '). Val ();
var payment = $ (' #payment '). Val ();
var memberlevelid = $ (' #memberLevelId '). Val ();
var sex = $ (' input:checked '). Val ();
$ (' #roleId1 '). Val (Roleid);//re-upload the extracted data to the action
$ (' #branchtId1 '). Val (Branchtid);
$ (' #productId1 '). Val (productId);
$ (' #payment1 '). val (payment);
$ (' #memberLevelId1 '). Val (Memberlevelid);
$ (' #sex1 '). val (Sex);
$ (' Input:radio '). attr (' disabled ', true);//Turn the interface into read-only
$ (' select '). attr (' disabled ', true);//Turn the interface into read-only
$ (' Input:text '). attr (' readonly ', true);//Turn the interface into read-only
}
function Restore () {
document.getElementById (' First1 '). style.display= "None";
document.getElementById (' First2 '). style.display= "None";
document.getElementById (' First3 '). style.display= "None";
document.getElementById (' Second2 '). style.display= "inline";
document.getElementById (' Second1 '). style.display= "inline";
$ (' Input:radio '). attr (' disabled ', false);
$ (' select '). attr (' disabled ', false);
$ (' Input:text '). attr (' readonly ', false);
}
Pass the data on this page through the URL to the action and pass it to the next JSP
function print () {
var name = $ (' #name '). Val ();//real name
var loginName = $ (' #loginName '). Val ();//Superior Agent login account
var cardId = $ (' #cardId '). Val ();//ID number
var mobile = $ (' #mobile '). Val ();//Mobile number
var tel = $ (' #tel '). Val ();//Landline
var address = $ (' #address '). Val ();//Address
var quantity = $ (' #quantity '). Val ();//Purchase volume
var bankname = $ (' #bankName '). Val ();//Bank Account
var BankAccount = $ (' #bankAccount '). Val ();//Bank Account
var productId = $ (' #productId '). Val ();//Product ID
var Branchtid = $ (' #branchtId '). Val ();//company ID to which it belongs
Window.location.href = "print?productid=" +productid+ "&loginname=" +loginname+
"&branchtid=" +branchtid+ "&quantity=" +quantity+ "&name=" +name+ "&cardid=" +cardId+
"&mobile=" +mobile+ "&tel=" +tel+ "&address=" +address+ "&bankname=" +bankname+
"&bankaccount=" +bankaccount;

}

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.