<script type=
"text/javascript"
>
var
isIE = navigator.userAgent.search(
"MSIE"
) > -1;
var
isIE7 = navigator.userAgent.search(
"MSIE 7"
) > -1;
var
isFirefox = navigator.userAgent.search(
"Firefox"
) > -1;
var
isOpera = navigator.userAgent.search(
"Opera"
) > -1;
var
isSafari = navigator.userAgent.search(
"Safari"
) > -1;
if
(isIE7)
alert(
'isIE7'
);
if
(isIE)
alert(
'isIE'
);
if
(isFirefox)
alert(
'isFirefox'
);
if
(isOpera)
alert(
'isOpera'
);
if
(isSafari)
alert(
'isSafari'
);
</script>
/*
參考資料:http://demo.tc/Post/366
*/
沒有留言:
張貼留言