Test handle quotes in input value

by Ben Clayton

HTML

<input id="inp" type=text value="1m" />

<br/><br/>
<div id="but">Press</div>

JavaScript

$('#but').on('click',function(){
    //debugger;
    var v = $('#inp').val();
    v = v.replace(/"/g,'&quot;');
    v= v.toUpperCase();
    $('#inp').replaceWith('<input id="inp" type=text value="'+v+'" />');
});