我试图弄清楚在不使用.browser的情况下检测firefox的最佳方法是什么(因为jquery 1.9已经弃用了它)
基本上我有这个HTML:
<label class="uploadButton" for="test">Test</label>
<input type="file" name="test"/>
这适用于IE和Chrome,但在Firefox中没有任何作用。 Pre 1.9我有这个:
if ($.browser.mozilla) {
$('.uploadButton').click(function () {
$(this).siblings("input").click();
});
}
哪个没有问题。
现在,.browser属性消失后,最好的方法是什么?
(我查看了功能,发现没有能够检测到类似内容的功能......)