Thursday, August 31, 2017

Script Tag

Script

HTML is not a programming language. So, on web pages, various scripting languages are used to add programming features, such as JavaScript, Jquery etc. Through this, it is possible to do a variety of interesting and important tasks, including displaying local time on web page, displaying time date, browser identification, time and events, to show users a special message.

To add scripts to JavaScript, Jquery etc., the HTML <script> </ script> tag is used. Such as
                          <Script type = "text / javascript" src = "jquery.js"> </ script>
                          <Script type = "text / javascript" src = "sliding_effect.js"> </ script>

Example Programs
<Html>
<Head>
<Title> www.tutohost.com </ title>
<Script type = "text / javascript">
Function show_alert ()
{
Alert ("Welcome to www.tutohost.com");
}
</ Script>
</ Head>
<Body bgcolor = "# 009933">
<Input type = "button" style = "margin-left: 150px; width: 100px; height: 50px; font-size: 18px; color: # F00" onclick = "show_alert ()" value = "Click Me" />
</ Body>
</ Html>

Open a Notepad and by typing the code above and clicking Save as from the file menu, save as file name: index.html, Save as type: All files, open the index.html file with Mozilla Firefox and look like the image shown below.



If click on the Click Me button, you will see the welcome to www.tutohost.com in an alert box.

No comments:

Post a Comment

Flash Addition Tags

Flash Addition One of the most interesting elements of the Flash Animation Web site. Attractive navigation bars, banners, buttons, etc. t...