Related Content
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.
Creating A Simple Pie Chart With CSS
A pie chart is a great way of showing the relationship between numbers, especially when showing percentages. Drawing a pie chart from scratch takes a fair amount of maths to get working and so people usually go for third party charting libraries in order to add charts to the page.
Getting Up And Running With Nightwatch.js
Nightwatch.js is an end to end testing framework, written in JavaScript. It can be used to test websites and applications and uses the W3C WebDriver API to drive modern browsers to perform the tests.
In this article I will look at setting up Nightwatch.js in a project and getting started with writing tests.
Seven Tips For Getting The Most Out Of Marp
The Marp suite of tools is great for creating presentations from simple Markdown rules.
Creating Presentations In Markdown With Marp
Marp or Markdown Presentation Ecosystem is a collection of tools that allows the generation of presentations of different formats from a markdown template. The tools are written in JavaScript and have a number of options that allow presentations of different styles and formats.
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 giHlZp8M8D 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 giHlZp8M8D on Fri, 04/02/2021 - 18:57
PermalinkAdd new comment