会员
周边
新闻
博问
融资
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
shuihanxiao
博客园
首页
新随笔
联系
管理
订阅
2024年2月23日
JS 跳转链接中的中文转码/中文解码
摘要: 转码 var url = "https://www.example.com/页面"; // 需要跳转的链接包含中文字符var encodedUrl = encodeURIComponent(url); // 对链接进行编码window.location.href = encodedUrl; // 通
阅读全文
posted @ 2024-02-23 14:08 shuihanxiao
阅读(183)
评论(0)
推荐(0)
编辑
公告