HTML

R4R® HTML
HTML Projects

HTML Project

HTML JavaScript
(追記) (追記ここまで)
(追記) (追記ここまで)

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.

It also provided to place a script within your 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

  1. Link script file
  2. Embed script code
Link script file

The script tag can be used to link external script file by src attribute. It must be used within the <head> tag only.

Example

<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 :

Embed script code

It is used within <body> or <head< tag to embed the scripting code.

Example

<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 :

(追記) (追記ここまで)

Example for using HTML head tag in Embed script code

<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 :

Supporting Browsers
(追記) (追記ここまで)
Copyright ©2021-22 r4r.co.in, all rights reserved. Theguestspost.com
Sitemap
Career
Post comment
About us
Subscription
Unsubscription

AltStyle によって変換されたページ (->オリジナル) /