Script language work with support of other language. (not a complete language depends on other language). This tag is used for client-side script as like a JavaScript and main useful uses such as JavaScript are image manipulation, form validation, and dynamic changes of html document.
Have you ever joined a new affiliate program or created a new publication that you wanted to add to your existing navigational set up, but dreaded having to manually add the links to every page on your site?
Syntax use in Script
<script> //code to be executed </script>
HTML script tag are two type of usage like as
The script tag can be used to link external script file by src attribute. It must be used within the <head> tag only.
<html>
<head>
<script type="text/javascript" src="message.js"></script>
</head>
<body>
<p>Welcome to JavaScript</p>
<form>
<input type="button" value="click" onclick="msg()"/>
</form>
</body>
</html>
Output :
It is used within <body> or <head< tag to embed the scripting code.
<html>
<body>
<script type="text/javascript">
document.write("This is provides a JavaScript
is a simple language for r4r.co.in learners");
</script>
</body>
</html>
Output :
<html>
<head>
<script type="text/javascript">
function msg(){
alert("Hello r4r.co.in"); }
</script>
</head>
<body>
<p>Welcome to Javascript</p>
<form>
<input type="button" value="click" onclick="msg()"/>
</form>
</body>
</html>
Output :
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R