How to check your browser type?

Javascript coding ..

Moderators: egami, macek, gesf

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

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
Xtian Cuan

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

Tue Sep 05, 2006 8:41 am

Use: navigator.userAgent and/or navigator.appName
E.g.: var useragent = navigator.userAgent;
Sincerely,
Gonçalo "gesf" Fontoura

gesf.org | sessionstart.com | urlms.com

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

Tue Sep 05, 2006 5:23 pm

thanks master gesf

I got it and it works,,, thanks
Xtian Cuan

Post Reply