The onclick attribute problem in HTML

Source: Internet
Author: User

This afternoon to get a table paging function, in fact, a small function with JavaScript to write a small function can be achieved, but actually took me a long time, has been unable to achieve.

At first it was thought that the servlet was not fully embedded in the HTML format (because it was implemented directly in the servlet), and later the test found that the page could be displayed without a full format.

Then questioned whether JavaScript was wrong (because it didn't last long) and then re-wrote the test output JavaScript in the form of an external link, and found that there was nothing wrong with it, but it didn't respond after the button was clicked.

Finally I have doubts about this button, a look at the button display format is not wrong Ah, in the Web page to view the source code also found no problem. But one problem is that I have the name of this function function as the onclick duplicate, because at the beginning of the time to write for the sake of convenience, took the same name, then I think it will not be related to this name? Then try to change it a bit. Actually. It's ready!!

@[email protected]| | I almost cried out.

Think back, you can not make the same mistake again, the original function name is not and the onclick and other key words to repeat, so the next time to take the function name must pay attention, can not be duplicated with the keyword!

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.