zoukankan      html  css  js  c++  java
  • 插件获取浏览器信息

    <script src="<?php echo base_url('themes/mall/js/fingerprint2.js?v=7'); ?>"></script>
    <script src="<?php echo base_url('themes/mall/js/ua-parser.js?v=7'); ?>"></script>
    <script src="<?php echo base_url('themes/mall/js/store.legacy.min.js?v=7'); ?>"></script

    // new Fingerprint2().get(function(result, components){ // //console.log(result); //a hash, representing your device fingerprint // $.each(components,function(index,value){ // console.log(index) // console.log(value) // }) // }); new Fingerprint2({ preprocessor: function(key, value){ if(key == "user_agent"){ var parser = new UAParser(value); // https://github.com/faisalman/ua-parser-js a = parser.getUA(); console.log(a) var userAgentMinusVersion = parser.getOS().name+ ' ' +parser.getDevice().model+ ' ' +parser.getCPU().architecture; return userAgentMinusVersion; } else { return value; } } }).get(function(result, components){ //console.log(result); //a hash, representing your device fingerprint console.log(components); // an array of FP components var data = {}; data.data = components; $.ajax({ type:'post', dataType:'json', data:data, url:'/test/test_111', success:function(res){ } }) $.each(components,function(index,value){ // console.log(value.key) // console.log(value.value) }) });

      

  • 相关阅读:
    Linux -- nginx
    Linux--虚拟环境
    Linux用户权限指令, 定时任务等指令
    Linux的基础命令, django的安装与使用
    .net与Java的WebService互调
    C#中的动态特性
    LINQ之路(3):LINQ扩展
    LINQ之路(2):LINQ to SQL本质
    LINQ之路(1):LINQ基础
    LINQ之路系列文章导读
  • 原文地址:https://www.cnblogs.com/brady-wang/p/8350682.html
Copyright © 2011-2022 走看看