if (/ipad/i.test(navigator.userAgent.toLowerCase())) { // 目前是用ipad瀏覽 window.top.location = '../m_coop/CoopVegLogin2.aspx'; } else if (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())) { // 目前是用手機瀏覽 window.top.location = '../m_coop/CoopVegLogin2.aspx'; } else { // 目前是用電腦瀏覽 window.top.location = '../coop1/CoopVegLogin2.aspx'; }