Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 9:48 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 7 posts ] 
Author Question
 Question subject: How to use HTML with JavaScript
PostPosted: Sat Oct 18, 2008 8:32 am 
Offline
Newbie
User avatar

Joined: Sat Oct 18, 2008 5:32 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time

Following is the simple code that shows How to use HTML with JavaScript

Code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -
function Message_Box (text) {
alert (text) }
// - End of JavaScript - -->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT NAME="name" TYPE=Text>
<INPUT NAME="submit" TYPE=Button VALUE="Click Me" onClick="Message_Box(form.name.value)">
</FORM>
</BODY>
</HTML>


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to use HTML with JavaScript
PostPosted: Sun Oct 19, 2008 10:29 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
thank you , keep on please :grin: :grin:

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to use HTML with JavaScript
PostPosted: Thu May 14, 2009 5:03 pm 
Offline
Newbie
User avatar

Joined: Thu May 14, 2009 4:56 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Nice comment! Also you can make a js file and include it in your HTML.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to use HTML with JavaScript
PostPosted: Sun Jul 12, 2009 7:33 pm 
Offline
Newbie
User avatar

Joined: Sat Jul 11, 2009 1:20 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
If you're having problem about "how to use javascript in HTML page you can visit here, to those interested click here


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to use HTML with JavaScript
PostPosted: Wed Jul 22, 2009 11:44 am 
Offline
Newbie
User avatar

Joined: Wed Jul 22, 2009 11:07 am
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
That is a good information,I just wanted to know that JavaScript is a client side script,can we use or embed in a PHP script ?







________________________________
Monavie Acai Berry & Berries Diagnosing Cause of Autism and Sign Language Detox Layouts Checklist Services NJ
Chapel Hill Medspa


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to use HTML with JavaScript
PostPosted: Wed Sep 22, 2010 12:10 pm 
Offline
Newbie
User avatar

Joined: Tue Sep 07, 2010 9:18 am
Posts: 30
Has thanked: 0 time
Have thanks: 1 time
Just by defining <SCRIPT LANGUAGE="JavaScript"> we can continue with the coding of HTML.
It is really beneficial to reduce errors...
thanx for the post.... :gOOd:

_________________
Robinetterie industrielle


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: How to use HTML with JavaScript
PostPosted: Fri Jun 17, 2011 1:39 pm 
Offline
Newbie
User avatar

Joined: Thu Jun 16, 2011 12:42 pm
Posts: 5
Has thanked: 1 time
Have thanks: 0 time
Example for JavaScript DisplayMessage () function

How to Display Hello World! (By HTML/Javascript)

Code:
<html>
<head>
<script language="javascript">
<!--Define a display function-->
function displaymessage()
{
alert("Hello World!");
}
<!--End of Display function-->
</script>
</head>

<body>
<form>
<input type="button" value="Click me!" onclick="displaymessage()" />
</form>
</body>
</html>


General syntax to define a function

Code:
function functionname(var1,var2,...,varX)
{
some code
}


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 7 posts ] 
Quick reply


  

 Similar topics
 JavaScript fade out problem
 Usage of xmp html tag
 display code block using html
 read php file in asp and display it as html
 keywords and description of HTML page using meta tag
 javascript read file
 wrapping text around image in html
 draw a horizontal line in your html page
 Configuring the header html font
 multi-frameset and non-re-sizable html frame pages

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team