Home Web Front-end JS Tutorial Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

May 16, 2016 pm 06:09 PM
semicolon

Test code:


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]


The output of each browser is as follows
IE6/7/8:

Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

IE9/Firefox/Chrome/Safari/Opera :

Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

You can see that the semicolon is missing in IE6/7/8. Be careful when using the cssText property. <script> var div = document.getElementsByTagName('div'); alert(div[0].style.cssText); </script>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

C++ syntax error: The statement is missing a semicolon, how to correct it? C++ syntax error: The statement is missing a semicolon, how to correct it? Aug 22, 2023 am 09:57 AM

C++ is a very powerful programming language, but when writing code, you will inevitably encounter syntax errors. Among them, missing semicolons in statements is one of the common errors. In this article, we will discuss the situation when a statement is missing a semicolon and provide solutions. What is a statement missing a semicolon? In C++ programs, each statement usually ends with a semicolon (;). The semicolon tells the compiler that the current statement has reached the end. If you forget to add a semicolon at the end of a statement, the compiler will report a syntax error. For example, the following code will cause a syntax error: #

PHP Practical Tip: Remove the last semicolon in your code PHP Practical Tip: Remove the last semicolon in your code Mar 27, 2024 pm 02:24 PM

Practical PHP Tips: Delete the Last Semicolon in the Code When writing PHP code, you often encounter situations where you need to delete the last semicolon in the code. This may be because copy-pasting introduces extra semicolons, or to optimize code style and structure. In this article, we will introduce some methods to remove the last semicolon in PHP code and provide specific code examples. Method 1: Use the substr function The substr function can return a substring of a specified length from a string. we can

PHP code: How to remove the last semicolon PHP code: How to remove the last semicolon Mar 26, 2024 pm 02:54 PM

Title: PHP code: How to remove the last semicolon When writing PHP code, sometimes an extra semicolon will be added accidentally, resulting in an error. But what if you want to remove the last semicolon? Several methods and specific code examples will be introduced below. Method 1: Use the substr function. You can use PHP's substr function to remove the last semicolon. Specific code examples are as follows:

PHP programming tips: How to deal with the last semicolon situation PHP programming tips: How to deal with the last semicolon situation Mar 26, 2024 pm 12:45 PM

PHP Programming Tips: How to Handle the Last Semicolon In PHP programming, you often encounter situations where you need to handle the last semicolon. Especially in loops and conditional statements, it is easy to cause program errors by writing one less or one more semicolon. In order to avoid this situation, we can adopt some programming techniques to handle the last semicolon situation. The following are some common techniques and code examples for handling the last semicolon: 1. Use if statements to determine the last semicolon

What happens if you misplace a semicolon in JavaScript? What happens if you misplace a semicolon in JavaScript? Aug 30, 2023 am 09:13 AM

If semicolons are misplaced in JavaScript, it can lead to misleading results. Let's look at an example where the if statement condition is false but the value is printed because of a misplaced semicolon. Example<!DOCTYPEhtml><html> <body> <script> varval1=10;&

Go language secrets: analysis of semicolon usage skills Go language secrets: analysis of semicolon usage skills Mar 07, 2024 pm 04:18 PM

In the learning process of Go language, the use of semicolons is often a detail issue that easily causes confusion. In its official documentation, the Go language stipulates the rules for using semicolons in code. Although in most cases, the Go language will automatically insert semicolons at newline characters, in certain cases, we still need to pay attention to semicolons. Use of numbers. This article will delve into the use of semicolons in Go language and analyze them with specific code examples. First, let's look at a simple example: packagemainim

A must-read for Go language developers: An in-depth analysis of semicolons A must-read for Go language developers: An in-depth analysis of semicolons Mar 07, 2024 pm 02:24 PM

Title: Must-read for Go language developers: In-depth analysis of semicolons In the Go language, the semicolon is a special symbol. Although it is not common in code, it plays an important role in syntax parsing and code execution. important role. This article will conduct an in-depth analysis of the use of semicolons in the Go language, combined with specific code examples, to help developers better understand and apply the role of semicolons in the Go language. 1. The role of semicolon in Go language. In most programming languages, semicolon is used as the end symbol of a statement to tell the compiler the purpose of a statement.

Beginner's Guide to Go Language: Precautions for Using Semicolons Beginner's Guide to Go Language: Precautions for Using Semicolons Mar 07, 2024 pm 06:36 PM

"Go Language Beginner's Guide: Precautions for Using Semicolons" Go language is a concise and efficient programming language, but for novices, some details may cause confusion, one of which is the use of semicolons. Compared with other languages, the rules for using semicolons in Go language are somewhat special and require special attention. This article will introduce this issue in detail and provide specific code examples to help novices understand better. In Go language, semicolons are not necessary because the compiler will automatically add semicolons for us. However, in some cases,

See all articles