How to get default value of Multiline text box through JQuery?

Posted by user144842 on Stack Overflow See other posts from Stack Overflow or by user144842
Published on 2010-05-30T22:54:00Z Indexed on 2010/05/30 23:02 UTC
Read the original article Hit count: 188

Filed under:
|
|

Hi Case is I want to prompt a message (Do you want to save changes?) if text box default value is updated on .aspx page before submitting the page. I am using .text() to compare with .val(). It works fine in firefox but failing in IE7 and IE8

if ($("#<%=txt1.ClientID%>").attr("value") === $("#<%=txt1.ClientID%>").text())
    return(true);
return confirm('Do you wish to save these changes?');

© Stack Overflow or respective owner

Related posts about c#

Related posts about JavaScript