SQL PHP HTML ASP JavaScript articles
 

Script & noscript tag in html pages

User browser runs client side scripts in the html page. To run the inline script codes we have to keep the code block within <script> and </script> tags. All the codes within these tags will be executed by the (client side) browser. With the introduction of Ajax the script tag is frequently used and client side scripting is playing a major role in developing web pages.

The most common type of script used at client side is JavaScript so we will start our example with one JavaScript code.

<script type="text/javascript">
document.write("Hello World");
</script>

We can keep all the JavaScript code at an external file and just load the same by using SRC attribute. Here is the example.

<script language="javascript" src="code.js"></script>

Here all the code is kept in an external JavaScript file ( .js ) and it is included by src="code.js"

Script execution support

Client browser setting can be changed to not to execute scripts. You can get all details on how to enable or disable script it here. If the script execution is disabled then we can use <noscript> tag and give a message to the user. Here we have used <noscript> html tag. Here is an example.

<noscript>Your browser does not support scripts, you have to enable it to run this page</noscript>

You can see the uses of this at our PHP Ajax section.


dany23-02-2010
it is very nice....
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2013 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer