문제

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

도움이 되었습니까?

해결책

Use .replace:

$('#usernames').val( $('#usernames').val().replace('.html',''));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top