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
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'...
Applying CSS to an iframe
There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style o...
Debug PHP applications: How to get useful errror messages
For syntax errors, you need to enable error display in the php.ini. By default these are turned off because you don't want a "custo...
How to: Check checkbox state with jQuery
jQuery 1.6+ Use the new .prop() function: $ ( '.myCheckbox' ). prop ( 'checked' , true ); $ ( '.myCheckbox' ...
No comments:
Post a Comment