Why does the layui pop-up box not display for the second time? it only shows the mask layer, and it can pop up normally for the first time.


< html lang= "en" >
< head >
< meta charset= "UTF-8" >
< meta name= "viewport" content= "width=device-width Initial-scale=1.0 ">
< meta http-equiv=" X-UA-Compatible "content=" ie=edge ">
< title > Document < / title >
< link rel=" stylesheet "type=" text/css "media=" all "href=. / layui243/css/layui.css" / >
< script type= "text/javascript" src= ". / layui243/layui.js" > < / script >
< script type= "text/javascript" src= ". / jquery-3.1.1.min.js > < / script >
< style >

button {
  width: 100px;
  height: 30px
}
-sharpcontent .contentTop {
  height: 300px;
}

< / style >
< / head >
< body >
< div id="content" style="display: none" >

<div class="contentTop"></div>
<div class="contentBottom">
  <textarea rows="3" cols="20"></textarea>
</div>

< / div >

<button id="btn"></button>

< / div >
< / body >
< script >
$("- sharpbtn") .click (function () {

)
layui.use(["layer"], function(){
  var layer = layui.layer;
  layer.open({
    title: "talking",
    content: $("-sharpcontent"),
    offset: "auto",
    area: ["500px", "600px"]
  });
});

})
< / script >
< / html >

Apr.30,2022

pop-up box with a parameter, type: 1

Menu