Operate tables using JavaScript

Source: Internet
Author: User
For a table, the object is a table. Generally, you can use VaR T = Document. getelementbyid ("T") to obtain the table object.

Table objects are more important to their rows sets, and each row is more important to the cell set. You can use inertrow and inertcell to create new lines and cells.

To better operate tables. I have encapsulated three HTC S. These three HTC s can also copy the JS scripts and use them directly. Each operation will throw a custom event. This makes it easy to use. For example, sortrow1.11 in the sorting table can throw a sort event. You can use onsort = "Fun ()" in the table to capture this event.

The following is a demonstration:

Select Table operation: selectrow1.1, which can throw an onselect event

Http://www.oceanstudio.net/oceanstudy/learn/htc/%E8%A1%A8%E6%A0%BC%E6%93%8D%E4%BD%9C/selectrow1.1/example.htm

Edit table operation: editrow1.1, which can throw onhide, onshow, and ondelete events.

Http://www.oceanstudio.net/oceanstudy/learn/htc/%E8%A1%A8%E6%A0%BC%E6%93%8D%E4%BD%9C/editrow1.1/editrow.htm

Sort table operation: sortrow1.11, which can throw an onsort event

Http://www.oceanstudio.net/oceanstudy/learn/htc/%E8%A1%A8%E6%A0%BC%E6%93%8D%E4%BD%9C/sortrow1.11/example.htm

At the same time, you can download these packages from the http://sps.oceanstudio.net, each compressed package has corresponding examples and instructions.

For non-ie problems, HTC can support ie5 or above and Firefox.

However, from January 1, 2nd day of this month to October 8, the total number of clicks on the website has been more than 5000. From the analysis of website utilization, 95% of users use IE6, and some users use ie5, few others use other. I want to generate a report one month after the website is running. This report may reflect some behaviors of technicians using browsers. For non-technical personnel, the ratio of IE should be much higher.

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.