i have this code of HTML
<textarea cols="120" rows="4" name="editor" id="editor" onkeyup="sendData()"></textarea>
<span id="container" name="container"></span>
and this one in JS
function sendData(){
var hc = document.getElementById('editor').value;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("container").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "w.php?h=" + hc, true);
xmlhttp.send();
}
also this one in w.php
<?php
$h = $_REQUEST['h'];
echo $h;
?>
when i use this code it's work very fine but there is a problem with tow letters first one "#" and second one "&" so how can i fix this problem :) thank you