This code is used to open a div by clicking a button and clicking the mouse in the blank area of the page to hide this div
Adsfsdf
Adsfsdf
Dfdfdf
Dfdfdfdf
Adsfsdf
Dfdfdf
Dfdfdfdf
Script
Var temEventobject = null;
Var temshowTag = false;
Function document. onclick ()
{
If (event. srcElement. abc = null & temshowTag = false)
{
Var temabc = document. getElementsByTagName ("pricep ");
For (I = 0; I {
Temabc [I]. parentElement. style. display = "none ";
}
}
}
Function showPricep ()
{
Document. getElementById (a). style. display = "";
TemEventobject = document. getElementById ();
TemshowTag = true;
}
Script
This code is used to do this. Click a button to open a p, and click the mouse in the blank area of the page to hide this p
Function document. onclick ()
{
}
In this way, you can override the events or methods of a built-in object, but only the document and window are allowed. Similarly, You can override events or methods such as alert.