ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    js get url 传递object

    Dec 22, 20218 min read
    export const  serialize = function(obj) {
      const ary = [];
      for (let p in obj)
        if (obj.hasOwnProperty(p) && obj[p]) {
          ary.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
        }
      return ary.join('&');
    };
    

    相关文章

    什么是文件头标识符 ?

    文件头标识符是位于文件开头的信息块,包含格式、版本等关键信息,用于指导计算机系统正确识别和处理文件。

    一个 HTML 表单中的 enctype 有三种类型

    HTML表单中的enctype属性有三种类型:application/x-www-form-urlencoded(默认)、multipart/form-data(用于文件上传和非ASCII数据)和text/plain,其中multipart/form-data适用于发送大量二进制数据或包含非ASCII字符的文本。

    next.js image onError fallback

    The provided Next.js component implements an `Avatar` function that uses the `next/image` component with an `onError` handler to switch to a fallback image URL if the primary image source fails.

    Docker 清理操作

    Docker 清理操作包括定期使用命令清理未使用的镜像、容器、卷和网络,以优化系统性能和空间利用。

    Flutter颜色(Color)使用和十六进制颜色转换

    本文介绍了Flutter中颜色的四种常见设置方法,并针对常用的十六进制色值进行了封装,以便更方便地使用。