Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the JavaScript equivalent of C# Server.URLEncode?

What is the JavaScript equivalent of C# Server.URLEncode?

like image 357
Slim Avatar asked May 11 '09 15:05

Slim


People also ask

Is C similar to JavaScript?

JavaScript compared with C JavaScript is interpreted and sometimes compiled at runtime with a just-in-time (JIT) compiler. C is statically typed. JavaScript is dynamically typed. C requires programmers to allocate and reclaim blocks of memory.

Is JavaScript faster than C?

That means, if you're on such a system, you're talking in microseconds for C and milliseconds for JavaScript (as per the JS online docs). So, rather than JS being four times faster, C++ is actually 250 times faster.

Is JavaScript derived from C?

The primary JavaScript implementations are written in C or C++ to offer better performances. However, others, such as the Rhino, are written in Java while other implementations are written in JavaScript. So JavaScript is based on multiple languages but not a single programming language.


2 Answers

encodeURI()

http://xkr.us/articles/javascript/encode-compare/#ref-js-msdn

like image 93
Chris Ballance Avatar answered Sep 28 '22 05:09

Chris Ballance


No, encodeURIComponent() exactly.

like image 38
omg Avatar answered Sep 28 '22 06:09

omg