开发者

Displaying validation control in a div tag

开发者 https://www.devze.com 2023-02-03 14:00 出处:网络
I have a div tag for which i have defined a border. i have given the validation control inside the 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;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消