How to add, delete, modify, and query information using javascript _ javascript skills

Source: Internet
Author: User
This article mainly introduces how to add, delete, modify, and query information in javascript. The example analyzes the javascript operation page elements to implement the add, delete, modify, and query function for page information, which has some reference value, for more information, see the example in this article. Share it with you for your reference. The specific implementation method is as follows:

Show all user interfaces

Name Gender Email Date of birth Operation

Script window. onload = function () {alert ("onload"); document. getElementById ("addu1 "). style. display = "none";} function selectAll () {var users = document. getElementById ("users"); var ips = users. getElementsByTagName ("input"); var chbk = document. getElementById ("chbk1"); for (var I = 0; I 1) {nowpage-= 1;} else {nowpage = 1; indexPageInfo (countRecord, trUsers);} var startindex = (nowpage-1) * PAGESIZE; var endindex = startindex + PAGESIZE; pageInfo (startindex, endindex, countRecord, trUsers);} downPage. onclick = function () {if (nowpage + 1> = countPage) {nowpage = countPage;} else {nowpage = + 1;} var startindex = (nowpage-1) * PAGESIZE; var endindex = startindex + PAGESIZE; PageInfo (startindex, endindex, countRecord, trUsers);} endPage. onclick = function () {if (nowpage> 1) {var startindex = (nowpage-1) * PAGESIZE; for (var I = 0; I = Startindex & I <endindex) {trUsers [I]. style. display = "block";} else {trUsers [I]. style. display = "none" ;}}function getPages (numpage) {indexPage. appendChild (document. createTextNode ("Homepage"); indexPage. setAttribute ("href", "#"); upPage. appendChild (document. createTextNode ("Previous Page"); upPage. setAttribute ("href", "#"); downPage. appendChild (document. createTextNode ("next page"); downPage. setAttribute ("href", "#"); endPage. appendChild (document. createTextNode ("last page"); endPage. setAttribute ("href", "#"); var pages = document. getElementById ("pages"); pages. appendChild (indexPage); pages. appendChild (upPage); pages. appendChild (downPage); pages. appendChild (endPage);} script

I hope this article will help you design javascript programs.

Related Article

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.