Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

JQuery Get/Find form button using text value

Posted on 2013-01-17
1
Medium Priority
?
347 Views
Last Modified: 2013-01-17
Hello,

If I have the following button in my page

<input type="button" class="btn" value="Find"  />

This button is loaded from a 3rd party application and does not have an id.
If it did have an id (e.g. "testb") I could use something like the following to find my button and set it's background image

$('[id$="testb"]').css("background-image", "url(http:www.mytest.com/myTest.jpg)");

However my button will never have an id and there is also the possibility that more than one button on the page therefore I can't search by class or type.

Can I search using the value"Find" as this will be unique?

Thanks in advance.
0
Comment
Question by:speedygonzalez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 38787058
Try this :
$(':button[value="Find"]').css("background-color", "red");
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question