Today we mark an interesting script by which we can finally write our sites in HTML 5 without fear of losing a large portion of users who use Internet Explorer, as we know, the current version (IE8) provides no support for the new markup.
The script in question is the work of developer Remy Sharp. At the time of writing the code is hosted on googlecode and can be integrated directly linking to the resource hosted on Google servers. The small javascript (about 1.5 Kb) must be integrated within the header of the HTML document ( … ) in this way:
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><!--[if IE]></span> <!--[ If IE]></span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script></span> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"> </ script></span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><![endif]--></span> <! [Endif] -></span>
Once done, even the Web browser from Microsoft will be able to read the new markup.
Related posts:
- Disable submit button with JavaScript
- Enter PHP in JavaScript
- Using the conditions for query UPDATE
- Validate the value of a hex color with PHP
- Cycling an empty array in PHP
- Restrict input length of the DB field to park
- Calculate the size of a MySQL database
- Save the output of phpinfo () in a file
- Fast override CSS styles
- Timing redirect with PHP