Results 1 to 4 of 4

Thread: How to insert JavaScript into HTML file?

  1. #1
    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

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    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.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

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

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    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

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,986,048.89816 seconds with 16 queries