<スクリプト言語= "JavaScriptの"タイプ= "テキスト/ javascriptの" > もし((navigator.userAgent。のindexOf( 'MSIE' ) > = 0) &&(navigator.userAgent。のindexOf( 'オペラ') < 0)){ 警告( '你是UseingIE') } else if(navigator.userAgent .indexOf( 'Firefox') > = 0){ alert( '你是使用Firefox') } それ以外の場合(navigator.userAgent。のindexOf('オペラ')> = 0){ 警告('あなたはオペラを使用している') }他{ 警告('あなたがウェブを閲覧するために、別のブラウザを使用している!') } </スクリプト>
jQueryはブラウザを判断します
おすすめ
転載: blog.csdn.net/wangyanxin928/article/details/51823064
おすすめ
ランキング