Menu
Home
Recent Posts
Encoding URL with JavaScript
1:50 PM
0
Share
Check out the built-in function
encodeURIComponent(str)
and
encodeURI(str)
, this should work:
var
myOtherUrl
=
"http://example.com/index.html?url="
+
encodeURIComponent
(
myUrl
);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Development and programming answers
Search articles
Popular Posts
PHP: Convert date to timestamp
PHP's strtotime() gives $timestamp = strtotime ( '22-09-2008' ); Which does work with the Supported Date and Time Formats D...
PHP: MySQL vs Mysqli
More beyond that performance mysqli have others relevant features: If you have a look at MySQL Improved Extension Overview , it should tel...
How to debug: unexpected T_VARIABLE PHP
An unexpected T_VARIABLE means that there's a $variable where there can't be one yet. Missing semicolon It most commonly in...
How to prevent SQL-injection in PHP
In the front-end development we validates the user input for invalid characters. If this is not validated and inserted without any modificat...
Security Article: How making secure HASH and Salt for password in PHP
The objective behind hashing passwords is simple: preventing malicious access to user accounts by compromising the database. Dont'...
No comments:
Post a Comment