Code: Select all
var user = "O'Conner, John";
b.innerHTML += "<input type='hidden' value='" + user + "'>";
Code: Select all
<input type="hidden" value="O" Conner, John'>
Code: Select all
<input type="hidden" value="O'Conner, John">
Code: Select all
var user = "O'Conner, John";
b.innerHTML += "<input type='hidden' value='" + user + "'>";
Code: Select all
<input type="hidden" value="O" Conner, John'>
Code: Select all
<input type="hidden" value="O'Conner, John">
Code: Select all
var user = "O'Conner, John";
user = user.replace("'", "‘");
b.innerHTML += "<input type='text' value='" + user + "'>";