I'm trying to remove '
from my string. How to do that? I'm using ajax with JSON.
My code looks like this:
<html>
<body>
<p id="testHTML"></p>
</body>
<script type="text/javascript">
$(document).ready(function() {
$.ajaxSetup({ cache: false });
setInterval(function() {
$.getJSON("IOCounter.html", function(data) {
$('#testHTML').text(data.testHTML);
});
}, 2000); //Refreshrate in ms
});
</script>
</html>
Inside testHTML, I get the string "HelloWorld" from IOCounter.html but when I display it inside index.html I get:
'HelloWorld'
Now I just want to remove '
to get only HelloWorld. What do I have to do?