Web development written JavaScript scripts do not execute in Chrome but 360 can

Source: Internet
Author: User

Recently wrote a chess layout page, because of the need for user interaction, so in different browser interaction, found that in the 360 compatibility Mode page layout is correct, but in Chrome and Firefox is the equivalent of no execution layout of the script, this is why? Later found in Ie10 above the version are not, and later found a variety of methods, and finally discovered that the original is to write JS plus script control div location and size must be added units: that is not to write:

var Object=document.getelementbyid ("background");
Object.style.height=qipan_h;
Object.style.width=qipan_w;
object.style.left= (Width-qipan_w)/2;
Object.style.position= "Absolut

Be sure to change to this:

var Object=document.getelementbyid ("background");
Object.style.height=qipan_h+ "px";
Object.style.width=qipan_w+ "px";
object.style.left= (Width-qipan_w)/2+ "px";
object.style.position= "Absolute";

Web development written JavaScript scripts do not execute in Chrome but 360 can

Related Article

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.