I simply try to use the .replace()
method. And it does not work.
HTML:
<div class="try"> </div>
JS:
var valr='r';
valr.replace('r', 't');
$('.try').prepend('<div> ' + valr + '</div>');
Result: I get 'r', while I would like to get 't'
Any idea on why it doesn't work?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…