一、检验是否为IE
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>首页</title> <script> if(!+[1,])alert("这是ie浏览器"); else alert("这不是ie浏览器"); </script> </head> <body> </body> </html>
时间: 2024-10-13 10:47:57