I would appreciate some feedback regarding the use of $(this)[0].defaultValue for determining whether a textbox value has change from the original value e.g.
//keyUp event
if($(this)[0].defaultValue != $(this).val())
{
//Field has been modified mark as dirty
}
In Chrome it seems to generate the desired output in the sense that the defaultValue is always the original value the textbox was loaded into the DOM with. However I have only recently discovered this value after crawling through DOM objects in the Chrome Dev tools looking for something completely different and I am concerned that it may come with a whole heap of problems. Additionally Google didn't turn much up which concerns me even more...
Any feedback greatly appreciated.
Cheers
Rob
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…