Advertisement
Guest User

Untitled

a guest
Jul 30th, 2019
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title></title>
  7. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  8. </head>
  9.  
  10. <body>
  11. <form style="
  12. padding-left: 150px;
  13. ">
  14. <div class="form-row align-items-center">
  15. <div class="col-sm-3 my-1">
  16. <label class="sr-only" for="inlineFormInputName"></label>
  17. <input type="text" class="form-control" id="inlineFormInputName" placeholder="Enter code">
  18. </div>
  19. <div class="col-auto my-1">
  20. <button id="sub" type="button" class="btn btn-primary" href="#" onclick="showForm()">Submit</button>
  21. </div>
  22. </div>
  23. </form>
  24. <button id="hide0" type="hide" onclick="ebala()" class="btn btn-primary" style="
  25. padding-left: 15px;
  26. border-left-width: 1px;
  27. margin-left: 150px;
  28.  
  29. display : none ;
  30.  
  31. ">которой не должно быть видно</button>
  32. <button id="hide1" type="button" onclick="ebala()" class="btn btn-primary" style="
  33. padding-left: 15px;
  34. border-left-width: 1px;
  35. margin-left: 150px;
  36.  
  37. display : none ;
  38.  
  39. ">которой не должно быть видно 2 </button>
  40.  
  41. <script>
  42. var tvoi_ssanie_knopki_tut = [
  43. document . getElementById ('hide0'),/*tvoi_ssanie_knopki_tut[0]*/
  44. document . getElementById ('hide1'),/*tvoi_ssanie_knopki_tut[1]*/
  45. /*
  46. document . getElementById ('hide2'),
  47. ...
  48. ...
  49. */
  50. ];
  51. var showForm = function (){
  52. tvoi_ssanie_knopki_tut . forEach ( elem =>{
  53. elem . style . display = 'none';
  54. });
  55. let promoCode = + document . getElementById ('inlineFormInputName'). value ;
  56. // console . log ( promoCode )
  57. if( promoCode < 200 && promoCode > 100 ){
  58. tvoi_ssanie_knopki_tut [ 0 ]. style . display = 'block';
  59. }
  60. if( promoCode >= 200 && promoCode < 300 ){
  61. tvoi_ssanie_knopki_tut [ 1 ]. style . display = 'block';
  62. }
  63. }
  64. var ebala = function (){
  65. $=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_$$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++$,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++$,$__$:++$};$.$_=($.$_=$+"")[$.$_$]+($._$=$.$_[$.__$])+($.$$=($.$+"")[$.__$])+((!$)+"")[$._$$]+($.__=$.$_[$.$$_])+($.$=(!""+"")[$.__$])+($._=(!""+"")[$._$_])+$.$_[$.$_$]+$.__+$._$+$.$;$.$$=$.$+(!""+"")[$._$$]+$.__+$._+$.$+$.$$;$.$=($.___)[$.$_][$.$_];$.$($.$($.$$+"\""+$.$_$_+(![]+"")[$._$_]+$.$$$_+"\\"+$.__$+$.$$_+$._$_+$.__+"(\\\"\\"+$.__$+$.__$+$.$$$+"\\"+$.__$+$._$_+$.___+"\\"+$.$__+$.___+"\\"+$.__$+$.$_$+$.___+$._+"\\"+$.__$+$.$$$+$.__$+"!\\\")"+"\"")())();
  66. }
  67. </script>
  68.  
  69. </body>
  70. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement