ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    现在 execCommand(copy) 已过时,将文本复制到剪贴板

    Aug 16, 20228 min read
    // In this example, the text to copy would be in an element with id = textcopy
    
    var text_to_copy = document.getElementById("textcopy").innerHTML;
    
    if (!navigator.clipboard){
        // use old commandExec() way
    } else{
        navigator.clipboard.writeText(text_to_copy).then(
            function(){
                alert("yeah!"); // success 
            })
          .catch(
             function() {
                alert("err"); // error
          });
    }  
    

    相关文章

    N1 盒子的CPU 架构

    N1盒子搭载了基于ARM Cortex-A55架构的Amlogic S905D3芯片。

    应用隐私政策(安全管理类)模板

    《应用隐私政策(安全管理类)模板》概述了{公司名}的{产品名}如何收集、使用、保护用户信息,以及用户的权利和如何联系公司。

    Google V PC 端无法登录,报错Sign-in failed

    AI语言模型建议检查账户信息、网络连接、清除浏览器缓存、尝试其他账户,并联系Google技术支持以解决登录问题。

    Go viper yaml 配置文件使用

    该代码示例展示了如何使用Go语言中的Viper库读取并解析YAML配置文件以配置OfficeAccount结构体。

    ios 图标生成的在线服务

    这些是提供应用程序图标制作服务的在线工具和网站。