I'm sorry if this question has been asked already. How would I find a user's browser and version using JavaScript or jQuery? I know that .browser()
is deprecated as of jQuery 1.9. I am not doing this for code specific purposes, I'm trying to find the browser type for statistical purposes.
Yes is it depecated already in jquery 1.9.
I guess the best code for determining the browser is to usethe traditional
navigator.userAgent
There is a JS Plugin thst you can use:
<p>
Click to <a id="detect_browser"
href="javascript:void(0);">Detect browser properties</a>
</p>
$("#detect_browser").click(function() {
alert(JSON.stringify(bowser, null, ' '));
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.