zoukankan      html  css  js  c++  java
  • vue为页面动态添加title

    var updateTitle = function(title) {
      document.title = title
      var mobile = navigator.userAgent.toLowerCase()
      if (/iphone|ipad|ipod/.test(mobile)) {
        var iframe = document.createElement('iframe')
        iframe.style.display = 'none'
        // 替换成站标favicon路径或者任意存在的较小的图片即可
        //iframe.setAttribute('src', 'static/user.png')
        iframe.setAttribute('src', 'static/images/icon1.png');
        var iframeCallback = function () {
          setTimeout(function () {
            iframe.removeEventListener('load', iframeCallback)
            document.body.removeChild(iframe)
          }, 0)
        }
        iframe.addEventListener('load', iframeCallback)
        document.body.appendChild(iframe)
      }
    }

  • 相关阅读:
    驱动
    设备编号
    makefile 中的赋值
    UART
    c 语言的复杂声明
    linux下arm汇编的常用指令解析
    linux下的arm汇编程序
    ok6410下的uboot分析与实现
    层级选择器的理解
    css外部样式的理解
  • 原文地址:https://www.cnblogs.com/apgy/p/7942440.html
Copyright © 2011-2022 走看看