Related Content
A Look At HTMX With PHP
Drupal 11: Using Storybook To Preview Single Directory Components
Single Directory Components (SDC) consist of a directory of files that go together to create a small component on a Drupal website. The component contains all the templates, styles, script, and images needed to display some content in a consistent way.
Using Colour Schemes To Create Light And Dark Modes In CSS
Allowing users to switch between light and dark colour schemes on websites is a popular feature. You can often see a small sun or moon icon that allows you to change from light mode to dark colour scheme, or visa versa. Some operating systems and user agents also have the ability to activate a dark colour scheme, which websites also pick up and use.
Creating A Mouse "Looking" Script With JavaScript
I've seen lots of "our team" pages over the years, but one of the ones that stood out to me the most were those that had an interactive element to them. For me, it adds a bit of personality to the page and makes it feel more alive than a bunch of silhouettes of the directors.
Creating Tic Tac Toe In JavaScript Part 2: Adding A Computer Player
After creating tic tac toe in JavaScript in my previous article I decided to add a second player in the form of a computer opponent.
Creating Tic Tac Toe In JavaScript Part 1: The Game
Tic Tac Toe (or noughts and crosses) is a good game to create when learning game development as it has simple rules and a known win state.
Comments
It is an excellent tutorial on how to change text of submit button when clicked and can be useful if you are writing an AJAX application or you know that there will be some sort of delay. I appreciate the nice work.
Submitted by ruben on Sat, 01/28/2012 - 12:22
PermalinkSubmitted by toplu mail on Sun, 01/22/2017 - 14:24
PermalinkSubmitted by Mat on Tue, 03/07/2017 - 05:07
PermalinkThe text changes, however, the button does not work anymore.
Submitted by Jason on Mon, 05/04/2020 - 13:02
PermalinkYes, the function returns false, which means the function will prevent the form from submitting.
If you want to allow the form to submit you can do something like this:
Submitted by philipnorton42 on Mon, 05/04/2020 - 14:30
Permalinksir can we do this button change text for some particular time period and after that time period the text will be same as the before we clicked??
Submitted by Sachin Dubey on Thu, 04/01/2021 - 17:28
PermalinkYes, you'll need to use the setTimeout() function to do that.
Submitted by philipnorton42 on Fri, 04/02/2021 - 18:57
PermalinkAdd new comment