Question

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?! :)

Était-ce utile?

La solution

Use .replace:

$('#usernames').val( $('#usernames').val().replace('.html',''));
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top