Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

How Javascript Controls IE Page Size

Date:2016-12-13 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

JavaScript can not only control the output content of the browser, but also control the browser behavior, such as closing the browser, maximizing the browser, controlling the browser scroll bar and browser menu. Codes 1-7 are a paragraph Website construction JavaScript code, which can control the size of the browser.
 Control IE page size code


Use the previous example. Note that line 4 is newly added. After saving, double-click to open the browser window, and the size of the browser window will be automatically adjusted to 500 (pixels) wide and 200 (pixels) high.

The Document object of JavaScript contains the actual content of the page, so the document object can be used to obtain the page content, such as page title, various table units, etc. Code 1-8 is an example of using JavaScript to obtain the page title and form value.
 Control browser size

Save the above code as "getdoc. htm", open it with a browser, and the running result is shown in Figure 1.19.
 Past page content


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.