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: Curly braces strings usage
They're used to escape variable expressions. From Strings : Complex (curly) syntax This isn't called complex because the syntax i...
IOS: Difference between atomic and non-atomic attributes
What do atomic and nonatomic mean in property declarations? @property ( nonatomic , retain ) UITextField * userName ; @property ( atomi...
How to solve: Warning: [function]: failed to open stream in PHP
It happens when you call a file usually by include , require or fopen and PHP couldn't find the file or have not enough permission ...
Objective-C: How to make UIText move up when keyboard is visible
With the iPhone SDK: I have a UIView with UITextFields that brings up a keyboard. I need it to be able to: Allow scrolling of the c...
PHP: Check if string contains specific word
You can use the strpos function which is used to find the occurrence of one string inside other: if ( strpos ( $a , 'are' ) !== ...
No comments:
Post a Comment