最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

escaping - Why does the javascript escape function ignore @*+? - Stack Overflow

programmeradmin0浏览0评论

I don't have a use case for this but I was recently asked this very question and w3schools helpfully tells you the characters are ignored but not why.

Anyone have any idea why this might be the case?

Thanks, David

I don't have a use case for this but I was recently asked this very question and w3schools helpfully tells you the characters are ignored but not why.

Anyone have any idea why this might be the case?

Thanks, David

Share Improve this question edited Jun 8, 2011 at 1:37 Billy ONeal 107k61 gold badges329 silver badges563 bronze badges asked Jun 3, 2009 at 14:32 DavidDavid
Add a ment  | 

2 Answers 2

Reset to default 7

The escape function is deprecated. Use encodeURI and encodeURIComponent instead.

From your source: "The escape() function encodes a string, so it can be read on all puters." Those characters are standard in the ASCII set, so there's no point in encoding them for this particular purpose.

发布评论

评论列表(0)

  1. 暂无评论