Dynamically set the image width to the screen resolution width [and ensure that it does not show a horizontal scroll bar]

Source: Internet
Author: User
  1. <% @ Page contenttype = "text/html; charset = gb2312" Language = "Java" %>
  2. <HTML>
  3. <Head>
  4. <Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
  5. <Title> dynamically set the image width to the screen resolution width [and ensure that no horizontal scroll bar appears] </title>
  6. </Head>
  7. <Body topmargin = "0" leftmargin = "0">
  8. <Table width = "100%" Height = "100" border = "0" cellpadding = "0" cellspacing = "0">
  9. <Tr>
  10. <TD> </TD>
  11. </Tr>
  12. <SCRIPT type = "text/JavaScript">
  13. // Dynamically set the image width to the screen resolution width [and ensure that there is no horizontal scroll bar] 23 to adjust the number, which can be changed
  14. Document. getelementbyid ("AA"). width = Window. Screen. availWidth-23;
  15. </SCRIPT>
  16. </Table>
  17. </Body>
  18. </Html>

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.