iosmf.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8" />
  4. <script src="assets/js/jquery-3.1.0.js"></script>
  5. <body>
  6. <button onclick="myFunction()">试一试</button>
  7. <script>
  8. function myFunction() {
  9. prompt("是否确认更改为营业中状态?<br>确认请输入手机号提交","sdfs",commitButton,closefun);
  10. }
  11. function commitButton() {
  12. alert(1)
  13. }
  14. function closefun() {
  15. document.getElementById("alertDiv").remove();
  16. }
  17. function prompt(text2,input,fun1,fun2) {
  18. $("body").prepend('<div id="alertDiv" style="font-size:30px;width: 100%;height: 100%;position :absolute ;background: rgba(0,0,0,0.5);display: none;"> ' +
  19. ' <div style="border-radius:25px;width: 500px;height: 350px; top: 0; left: 0; right: 0; bottom: 0; margin:500px auto 0 auto ;' +
  20. 'background: white;text-align: center;padding: 20px;"> <label style="font-size:40px;">系统提示</label> ' +
  21. ' <div style="margin-top:10px;"> <label id="syyText2">是否提供手机号</label><br></div> <input id="syyInput" style="font-size:30px;border: 1px solid #ccc;width: 100%;height:15%;margin-top: 5%;"><br><br> ' +
  22. ' <table width="100%" style="height:90px;border-top: 1px solid #a0f7dd;"> ' +
  23. ' <tr><td style="border-right: 1px solid #a0f7dd;"><b style="color: blue" id="syyCommit">提交</b></td> ' +
  24. ' <td><b style="color: blue" id="colsefunid">关闭</b></td> </tr> </table> </div> </div>');
  25. document.getElementById("alertDiv").style.display = "";
  26. // document.getElementById("syyText1").innerHTML=text1
  27. document.getElementById("syyText2").innerHTML=text2
  28. document.getElementById("syyInput").value=input;
  29. document.getElementById("syyCommit").onclick=fun1
  30. document.getElementById("colsefunid").onclick=fun2
  31. }
  32. </script>
  33. </body>
  34. </html>