If the user-agent includes the word "myapp", then alert('hi');
BTW, 开发者_C百科I am using JQuery.
if (navigator.userAgent.indexOf("myapp") !== -1) {
alert("hi");
}
I recommend you don't do user-agent sniffing.
If the user-agent includes the word "myapp", then alert('hi');
BTW, 开发者_C百科I am using JQuery.
if (navigator.userAgent.indexOf("myapp") !== -1) {
alert("hi");
}
I recommend you don't do user-agent sniffing.
精彩评论