Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
142
rated 0 times [  146] [ 4]  / answers: 1 / hits: 47756  / 14 Years ago, wed, june 16, 2010, 12:00:00

how to find whether a value of variable is changed or not in javascript .


More From » javascript

 Answers
270

Ehm?



var testVariable = 10;
var oldVar = testVariable;

...
if (oldVar != testVariable)
alert(testVariable has changed!);


And no, there is no magical var.hasChanged() nor var.modifyDate() in Javascript unless you code it yourself.


[#96480] Monday, June 14, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dustin

Total Points: 599
Total Questions: 105
Total Answers: 106

Location: Belarus
Member since Tue, Mar 14, 2023
1 Year ago
dustin questions
;