I would like to show a message on my ASP.Net page like “Record saved” on save button click. After 5 seconds, I would like to hide it.
How can I do in JavaScript? Can I avoid to add jQuery (I’m not using it)?
I would like to show a message on my ASP.Net page like Record saved
Share
You could use the
setTimeoutfunction which allows you to defer the execution of a callback in the future. So you could place the following in the page:Due to ID name mangling with ASP.NET you could use a class selector. And once you start doing this and your users start to ask you about adding some fade out effects you will quickly realize that a framework such as jQuery might come in handy.