peterlu Posted August 29, 2016 Share Posted August 29, 2016 This may be a simple question. I think I miss one function to get the link button working. I need users enter their keywords into placeholder and click convert button, so the result can show up, not enter in the script. Can anyone help? Thanks much! <body><p>Enter foregin character and click covert</p><input id="demo" placeholder="Keyword"><button onclick="myFunction()">Convert</button><p id="demo"></p><script>function myFunction() {var uri = "my test.asp?name=ståle&car=saab";var res = encodeURI(uri);document.getElementById("demo").innerHTML = res;}</script></body> Quote Link to comment https://forums.phpfreaks.com/topic/302031-get-function-php-script-foreign-character-conversion/ Share on other sites More sharing options...
codefossa Posted September 10, 2016 Share Posted September 10, 2016 It looks like the only thing you're missing is getting the value of the input, or I'm missing what the question actually is? Here's what I think you're wanting. https://jsfiddle.net/bme5ahjs/ Quote Link to comment https://forums.phpfreaks.com/topic/302031-get-function-php-script-foreign-character-conversion/#findComment-1537326 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.