Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

input target value with jquery

Hi I've tried a few different ways of doing this but nothings working for me, I'm using a system that I cannot physically edit the code I need. I have an input with the following code

<input type="submit" name="ctl10$loginImageButton" value="Logout" id="ctl10_loginImageButton"     class="cssloginImageButtonlogout cssbutton">

And all I need to do is change the value of the value from "Logout" to "GO" using jQuery

If someone could help i'd appreciate it I'm starting to pull my hair out now :/ Thanks

like image 743
user2791952 Avatar asked Feb 03 '14 11:02

user2791952


1 Answers

Use this jQuery:

$(document).ready(function(){
    $("input[type=submit]").val("Go");
});

OR can use this:

$(document).ready(function(){
    $("#ctl10_loginImageButton").val("Go");
});

Make sure that you are including the JS at right place. means it should be only for this page. If you want to change the Text only this button.

like image 199
Code Lღver Avatar answered Nov 15 '22 10:11

Code Lღver