Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-11-2009
Member
 
Join Date: Nov 2009
Posts: 56
How to insert JavaScript into HTML file?

Hey folks,

I am developing a web page for my business need using Hyper text markup language (HTML). I wanted to use java into my web page to insert popup. I am very familiar with the HTML but the problem is that i am not aware of the Java language. And it very urgent for me so someone please help me out with the code for the JavaScript to use with HTML.

Thanks in advance
Reply With Quote
  #2  
Old 24-11-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: How to insert JavaScript into HTML file?

In order to insert a Javascript into your HTML file you have to use script tag. Just type the name of the language inside the script tag i.e. <script> and close the script tag with the </script> tag.
  1. <html>
  2. <title>JavaScript in HTML File</title>
  3. <body>
  4. <script type="text/javascript">
  5. document.write("My first Javascript Programe");
  6. </script>
  7. </body>
  8. </html>

The document.write command lets the browser know that this is a JavaScript command to perform execution.
Reply With Quote
  #3  
Old 24-11-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: How to insert JavaScript into HTML file?

Its not that difficult to add javascript to your html. just follow the process given below:
  • Open you webpage for inserting the javascript code in HTML.
  • Just give the mark with any name where you want to display javascript
  • Now save the html.
  • Open it with the Notepad and check for the entry you marked before.
  • Just delete the mark and pest the javascript code.
  • Save the notepad file.
  • Open file with browser.
That it!!!!!!!!!!!
Reply With Quote
  #4  
Old 24-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: How to insert JavaScript into HTML file?

Hello,

Here i am posting this procedure to insert javascript into html through C#

For this you have to use file I/O.

Just click on the file to open it go to the position where you want to make change and copy the code from there to end of the file Now insert the Javascript code and write the array buf. Now open up your browser to see the change.

Thank you
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , , , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to insert JavaScript into HTML file?"
Thread Thread Starter Forum Replies Last Post
Insert HTML text box - Empty Shell - Software Development 10 23-12-2010 04:22 AM
How to Insert Special Characters in JavaScript? super soaker Software Development 4 02-02-2010 05:16 AM
How to insert an em dash in MS Word and HTML Vania Windows Software 2 16-05-2009 11:51 AM
insert url of a video in a html code Richard B Rufus Software Development 4 10-02-2009 10:59 AM
How do I insert an image in HTML? Pikachoo Software Development 3 05-02-2009 11:09 PM


All times are GMT +5.5. The time now is 04:39 PM.