Use the Developer Tools console to debug JS statements in the page

Source: Internet
Author: User

Because to get an automatic landing tool for a webpage, it is necessary to use JS for the elements of this page to select and manipulate, complex JS selection if directly in the mind is prone to error, and once the error is not good to judge the cause of the error.

The console feature of the developer tools in the browser provides us with a feature that is as convenient as debugging a program in a local development tool.

For example, to debug the blog home page, the right mouse button to select the corresponding elements in the pages, pop-up menu selection review elements:

Suppose we want to select the A-tag element of the title in the graph, whose ID is homepage1_homepagedays_dayslist_ctl00_daylist_titleurl_0, then we switch to the console:

Input JS directly after the SELECT statement, enter, you can see the results of the input statement execution. You can do a real-time JS script operation on the current page. Very convenient and quick.

Use the Developer Tools console to debug JS statements in the page

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.