i have a validator like this,
checkAmount: function(){
if(){
//true
$("#a").removeClass("d-none");
}
else{
//false
$("#a").addClass("d-none");
}
}
but when I inspect the div element it still appears like this
<div id="a" class="col-md-7 offset-md-5 d-none"></div>
and I can easily remove the d-none class that was used for validation
The question is how do I hide the div when it is false so that I can't inspect the element?
i have a validator like this,
checkAmount: function(){
if(){
//true
$("#a").removeClass("d-none");
}
else{
//false
$("#a").addClass("d-none");
}
}
but when I inspect the div element it still appears like this
<div id="a" class="col-md-7 offset-md-5 d-none"></div>
and I can easily remove the d-none class that was used for validation
The question is how do I hide the div when it is false so that I can't inspect the element?
Share Improve this question asked Jul 24, 2019 at 4:59 MisdanMisdan 1531 gold badge6 silver badges15 bronze badges 1- You can't do like that because you can't handle developer tools functionality – Ankur Commented Jul 24, 2019 at 5:02
3 Answers
Reset to default 5To remove html from your DOM
$("#a").remove();
if you want to hide only then use
$("#a").hide();
$("DOM").hide(); can be used to hide element
$("DOM"). remove(); can be used to remove element which u can't see in browser inspect element
$("DOM").hide();
you can use this hide method to hide elements
$("DOM").remove();
you can remove method to remove any hidden inspects elements
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744967782a4603787.html
评论列表(0条)