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.