can anyone suggest me how can we add javascript code to html.. i am very much interested in creating websites with javascript .... please do help me out with us.. i really seek your help guys..
regards
jagan
Printable View
can anyone suggest me how can we add javascript code to html.. i am very much interested in creating websites with javascript .... please do help me out with us.. i really seek your help guys..
regards
jagan
what is javascritp. where do you use that. i will like to learn the uses of that javascript too.
yes javascript is very useful for programming websites.Quote:
Originally Posted by therealdeal
but tell me where can i practice writing java scripts. i want to work practically while learning it
is javascript really useful in programming websites well i think that we have that javascript option in the blog. you just have to look for a word javascript/html.
javascript is very useful for programming websites. in blogger can u use it.
But I guess you can hack a website too using javascript if javascript is used by that site.
javascript into HTML, never heard that.
What do you want to make with that?
I think Javascript is different with HTML
Well you can insert javascript into HTML but the javascript may have flaws if not programmed properly.Quote:
Originally Posted by alec11
There are two ways you can javascript in to HTML.
1. Write .js file and write all the java script function and call the function from your html files.
2. You can write java script in your own HTML files itself.This is difficult to maintain if HTML file is big.
eg
<html>
<head>
<script>
function MyFunction()
{
alert("Hello World!");
}
</script>
</head>
<body>
<form>
<input type="button" value="Click me!"
onclick="MyFunction()" >
</form>
</body>
</html>
the above simple example when you click the Click me buttion you will see alert of the Hello World
It is real tough task if you have good idea of html and javscipt then only you can do the combination.
You can insert small javascripts in html file to perform certain function. Pl find 'fg-a.com' (insert a www before this text) for some free javascript codes. You will find this from the menu which is written in the left side.
Quote:
Originally Posted by therealdeal
If you know the HTML then in that you will find <head> </head> tag so in between you have to add Java script in below format.
<head>
<script language="Javascript" type="text/javascript">
<!--
// Your java script will goes here
//-->
</script>
</head>
I hope this will help you to add you and use Java script in yout HTML page. Good luck!
Here is the link that i think will answer your question.
http://www.dummies.com/how-to/conten...-and-html.html
See the Example of a simple Program in both HTML and JavaScript
Program in html:-
<HTML>
<HEAD>
<title>HTML to JavaScript</title>
</head>
<BODY>
HTML to JavaScript Converter
</BODY>
</HTML>
Program in JavaScript:-
<script language="JavaScript">
<!--
document.writeln("<HTML>");
document.writeln("<HEAD>");
document.writeln("<title>HTML to JavaScript</title>");
document.writeln("</head>");
document.writeln("<BODY>");
document.writeln("HTML to JavaScript Converter");
document.writeln("</BODY>");
document.writeln("</HTML>");
//-->
</script>
Hope this will help you.......
To design a web site, Java script is not needed but you can really use that to make the page more interactive and dynamic
Hi sekhar nice yaar, i like it you have explained it in professional way and a layman can understand from your example that what is html and what is javascript? and few things i want to add here java script is an auxiliary script means its not mandatory for every site but its the most powerful script and according to me its the king of script you can do anything with java and the client side system is handled by this java script only, any kind of validation whether its login validation, credit card validation or any kind of validation done by java script only.Quote:
Originally Posted by sekhar4m92
Sekhar while providing this script do one thing , in text box above u will find one button called "Code" just use that option because it will help to see any kind of code in well manage and another use of the code button is, in forum's back end we run it from BBcode when we write any code like javascript or any kind of code without using the code option it will put little effect on the BBCode but your code is not harmful at all but when you want to add any code to show any example use the "Code" option. You Did a gr8 job, You, alensot, revvv1234, microsoft, Danega you guys are rocking and i like to read your all technical answers so keep contributing your skill here.
Thanks,
Bye.