Predict URL Encoding
预测输出 中等
题目
什么是 百分比-encoded 表单的 查询值 'hello 世界'?
代码
Original: ?q=hello world
Encoded: ?q=___
提示
空间是 encoded as %20 in URLs.
解释
URLs cannot 包含空间. 百分比-encoding replaces unsafe characters 使用 % followed 通过它们的 ASCII hex 值. 空间 (ASCII 32, hex 20) becomes %20. 所以 'hello 世界' encodes 到 'hello%20world'. 一些系统也 接受 '+' for 空间 in 查询字符串.
相关资源
相关课程
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。