Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4250380
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:31:15+00:00 2026-05-21T04:31:15+00:00

How do you change the text value of a button in jQuery? Currently, my

  • 0

How do you change the text value of a button in jQuery? Currently, my button has ‘Add’ as its text value, and upon being clicked I want it to change to ‘Save’. I have tried this method below, but so far without success:

$("#btnAddProfile").attr('value', 'Save');
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:31:16+00:00Added an answer on May 21, 2026 at 4:31 am

    Depends on what type of button you are using

    <input type='button' value='Add' id='btnAddProfile'>
    $("#btnAddProfile").attr('value', 'Save'); //versions older than 1.6
    
    <input type='button' value='Add' id='btnAddProfile'>
    $("#btnAddProfile").prop('value', 'Save'); //versions newer than 1.6
    
    <!-- Different button types-->
    
    <button id='btnAddProfile' type='button'>Add</button>
    $("#btnAddProfile").html('Save');
    

    Your button could also be a link. You’ll need to post some HTML for a more specific answer.

    EDIT : These will work assuming you’ve wrapped it in a .click() call, of course

    EDIT 2 : Newer jQuery versions (from > 1.6) use .prop rather than .attr

    EDIT 3 : If you’re using jQuery UI, you need to use DaveUK’s method (below) of adjusting the text property

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to change my radio button text in android app with a value
How can I with js or jQuery change input text value with js or
I am currently loading data via ajax, upon its success the following jQuery function
I have a test form where my radio button have text and value. I'm
Hi i want to get changed text value from JQuery but i can't select
I'm trying to change the color of a UILabel depending on the .text value
I can't change the value of the text field (with the id code) to
Currently I have an HTML form with a hidden field right before a text
Any way to change the default text for a submit button? For example, the
I have a very small jquery app with one button and a jquery function.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.