SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Alert,Prompt,Document.write(' ')

    Hello everybody!

    Besides Alert,Prompt,Document.write('blob blob blob') what else there is in Javascript?

    Something like Document.write('blob blob blob') is good, but it does not preserve the contents of the page and makes a new page with the content of blob blob blob
    -1/2=999?

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.write can be used to write content into the exists page:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>Untitled Document</title>
            <script type="text/javascript"></script>
            <link rel="stylesheet" type="text/css" media="screen" />
        </head>
    
        <body>
    
            this is normal text<br />
    
            <script type="text/javascript">
                document.write('this is using document.write');
            </script>
    
        </body>
    </html>


  3. #3


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
  •