Displaying validation control in a div tag
I have a div tag for which i have defined a border. i have given the validation control inside the div tag Now before clicking the "submit" i get to see the div tag and border. -> how to avoid this开发者_运维百科 Now after clicking the "submit" i get to see the div tag and border-> which is exptected and correct.
My question how to hide the border in the div tag before clicking the "submit" button or on the click of the "cancel" button
You can't with css. You need javascript to do this.
<input type=submit onclick="removeborder(this)" />
function removeborder(obj) {
obj.style.borderStyle = "none";
return true;
}
精彩评论