zoukankan      html  css  js  c++  java
  • js的一些代码

    }
    function getStringLen(b) {
    var a = b.match(/[^\x00-\xff]/ig);
    return b.length + (a == null ? 0 : a.length)
    }
    function getBrowserType() {
    var a = 0;
    if (window.ActiveXObject) {
    if (window.XMLHttpRequest && !window.XDomainRequest) {
    return 5
    } else {
    if (window.XDomainRequest) {
    return 6
    } else {
    return 1
    }
    }
    } else {
    if (typeof (Components) == "object") {
    a = 2
    } else {
    if (typeof (window.opera) == "object") {
    a = 3
    } else {
    if (window.MessageEvent && !document.getBoxObjectFor) {
    a = 7
    } else {
    if (navigator.appVersion.indexOf("Safari") >= 0) {
    a = 4
    }
    }
    }
    }
    }
    return a
    }
    function checkCookieEnabled() {
    try {
    if (navigator.cookieEnabled == false) {
    return false
    }
    } catch (a) {}
    return true
    }

  • 相关阅读:
    Vue(知识讲解)
    爬虫框架:scrapy
    爬虫性能相关
    MongoDB
    Beautifulsoup模块
    selenium模块
    requests模块
    爬虫(集锦)
    爬虫目录
    Flask目录
  • 原文地址:https://www.cnblogs.com/yanypan/p/2776742.html
Copyright © 2011-2022 走看看