Home > front end > Js function trigger condition how to set up as a js function
Js function trigger condition how to set up as a js function
Time:04-21
The background is like that, I want to write a js script, because a site is always pop up one thing to let a person very vexed Pop up logic is a js function. Through the append added some HTML element
function AppendWarningHtml () { If ($(" # dvWarningView ".) length & lt;=0) { Var a="& lt; Div class="playgoon 'id=' dvWarningView '& gt;
"; "DocumentKnowledge==knowledgeType?" $(" # docplayercontainer "). Append (a) : ($(" # playervideocontainer "), append (a), $(" # playeraudiocontainer "). Append (a), $(" # playercontainer "). Append (a)), "VideoKnowledge==" knowledgeType & amp; & Void 0!==myPlayer & amp; & "Playing"==myPlayer. GetState ()? MyPlayer. Pause () : clearInterval (timer) } } Can want to write a js function after this function call direct call RemoveWarningHtml () avoid trouble
CodePudding user response:
To write pop-up js method to reset to empty Hide to append the dom directly