Send Email Notification ONLY If Someone Replies To My Comment(s).Many of use it but dont know what difference and features in makes in HTML5.
![]() Lets see the attributes of script tag type attribute of script tag This attribute is used to specify what scripting language you are using. Browsers support scripting languages like JavaScript(textjavascript or applicationjavascript), VBScript(textvbscript) and ECMAScript(textecmascript or applicationecmascript). Old browsers support only textjavascript but newer ones support both. If this attribute is not assigned then it defaults to textjavascript in HTML5. In HTML4 it depends on browser, so we should assign it in HTML4. For example: script type textjavascript var a 9; var b 19; alert(ab); script src attribute of script tag It not necessary to write scripts inside the HTML document. We can create a external script file and link to the current document using src attribute. It can be assigned to a absolute or relative URL of the script file. Used along with src attribute. This is used to specify the character encoding of our external script file. If src attribute and charset directive are missing then browser defaults to ISO-8859-1. Vbscript Html Examples Code Inside ItSo when browser encounters script tag it executes(downloads and executes if external file) the code inside it before continuing execution of HTML document. If browser encounters functions like setInterval, setTimeout or Web workers inside the script then it creates multiple threads which run alongside the main thread. But async attribute can make it asynchronous if we are using external file. When browser encounters async attribute it creates a new thread and then downloads and executes the script in the newly created thread. Therefore the text Hello World is never displayed. Hello World index.js while(true) In this below example we are using async attribute. We will be able to see the text Hello World. Hello World index.js while(true) async is only recognised by HTML5. Normally its set to false but when we create script tags dynamically, async attribute is set to true. ![]() We can make it to false if we want, in that case the main thread is responsible for executing it. Its use is same as window.onload event. This attribute is only valid for external scripts. Its not difficult to use script tag but understanding how it works is important to build a proper application. Thanks for reading. May 13, 2014 Narayan Prusty Image Slider Using HTML And CSS Only Maintaining Aspect Ratio of iFrame in Responsive Site Comments: 0 Leave a Reply Cancel reply Do Not Send Email Notifications.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |