In our HTML on click function change the div bg color, but when page refresh change the colour. I don’t want to change the color after page refresh or reload.
If i understand u correct, then on page refresh you want to retain the bg color. Which will not be possible as when you refresh the page it loads again. To solve this problem you need to go to the server. On load function (client) you can write code to change the bg color based on some returned flag from server which you should set after you click on button.
Edited 2-Oct-12 2:02am
If you want to keep this change just between page refresh, you can use session cookie: just store in a cookie all altered styles and apply the on page load. But if you want to keep the between sessions on different clients, you need to store the changes on the server in some sort of personal preference or business data.
Edited 2-Oct-12 2:36am
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)