Use .replace
:
$('#usernames').val( $('#usernames').val().replace('.html',''));
Pergunta
i have a input just like below with asal.html value
<input type="text" id="usernames" name="link_user" class="setinp" value="asal.html" maxlength="80" style="float:right;">
and i want remove .html end of value with jquery onload !
just like :
<input type="text" id="usernames" name="link_user" class="setinp" value="asal" maxlength="80" style="float:right;">
can you help me everyone?! :)
Solução
Use .replace
:
$('#usernames').val( $('#usernames').val().replace('.html',''));