Unlimited Concepts

Would you like to react to this message? Create an account in a few clicks or log in to continue.


2 posters

    Which browser are you using?

    +uc.Un1x
    +uc.Un1x
    Admin
    Admin


    Posts : 125
    Join date : 2009-04-04
    Age : 36
    Location : Marikina

    Which browser are you using? Empty Which browser are you using?

    Post by +uc.Un1x Sat Apr 25, 2009 7:22 am

    You need to know which browser you're dealing with to be able to do the right Javascript trick.

    This is where the navigator
    browser object comes in. This object holds all kinds of details about
    the browser. Here are the relevant properties of this object:

    Code:
    navigator.appName

    Provides the name of the browser application.

    Code:
    navigator.appVersion

    Provides the version of the browser.

    Code:
    navigator.userAgent

    Provides more details about the browser.

    For example, here's a script that displays these properties in a Web page.
    note the + sign, which you use to join text strings together in java script:

    Code:
    <html>
      <head>
        <title>
          What's Your browser?
        </title>
      </head>
      <body>
        <script language="javascript">
          document.write("You're using: " + navigator.appName)
          document.write("<br><br>")
          document.write("Version: " + navigator.appVersion)
          document.write("<br><br>")
          document.write("Browser details: " + navigator.userAgent)
        </script>
        <h1>What's your Browser?</h1>
      </body>
    </html>

    Just save it as .HTML file and try to open in different browsers (whether IE or FF) and see the difference.
    asainmo
    asainmo


    Posts : 1
    Join date : 2009-04-25

    Which browser are you using? Empty Re: Which browser are you using?

    Post by asainmo Sat Apr 25, 2009 7:37 pm

    pano poh mg gawa ng background sa fs d2


    tnx u

      Current date/time is Sun May 19, 2024 6:43 am