ブラウザ判定

alert(navigator.userAgent);

if(navigator.userAgent.match(/Firefox/)){

alert("foxです");

}else{

alert("foxちがう");