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
Android: How to get screen width and height
If you want the display dimensions in pixels you can use getSize : Display display = getWindowManager (). getDefaultDisplay (); Point ...
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...
Phyton: Slice notation
It's pretty simple really: a [ start : end ] # items start through end-1 a [ start :] # items start through the rest of the arra...
Example PHP: cURL HTTP POST
You'll find php/curl examples here: http://curl.haxx.se/libcurl/php/examples/ , especially http://curl.haxx.se/libcurl/php/examples/simp...
Hide or close the Android Soft Keyboard
If you have in your layout a EditText and want to hide it with a Button then you can force Android to hide the virtual keyboard using t...
No comments:
Post a Comment