How to check your browser type?

Javascript coding ..

Moderators: macek, egami, gesf

trestian
New php-forum User
New php-forum User
Posts: 51
Joined: Wed Jan 25, 2006 6:24 pm
Location: Philippines,Davao City
Contact:

How to check your browser type?

Postby trestian » Tue Sep 05, 2006 2:04 am

Good Day!

Any body help me how to check what kind of broswer you used? in java script

Exampled:

If(mozilla){

execute code
}
If(ie){

execute code
}


thanks in advance for the help

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Tue Sep 05, 2006 8:41 am

Use: navigator.userAgent and/or navigator.appName
E.g.: var useragent = navigator.userAgent;

trestian
New php-forum User
New php-forum User
Posts: 51
Joined: Wed Jan 25, 2006 6:24 pm
Location: Philippines,Davao City
Contact:

Postby trestian » Tue Sep 05, 2006 5:23 pm

thanks master gesf

I got it and it works,,, thanks


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 0 guests