Click here to Skip to main content
14,390,091 members
Rate this:
Please Sign up or sign in to vote.
See more:
Is it possible to use javascript to add a property to an HTML input control? I would like to add a property that would contain the original content of the text box to verify if it has been changed by the user. Now I am using a hidden control, but I would like to make it easier to check for a change.
SWKFalcon 13-Apr-12 8:10am
This works well on any text field. Fortunately, I don't have many other types of controls. Thanks.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

There is already an attribute that contains the value that was assigned to text inputs and textareas from the HTML - defaultValue.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100