Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <a id = "a" onclick = "divFunction()">Forgot Password</a>
  2.  
  3. <script type="text/javascript">
  4. function divFunction(){
  5. //Some code
  6. swal({
  7. title: 'Multiple inputs',
  8. html: true,
  9. text: '<h2>Login details for waybill generation</h2>'+
  10. '<input id="swal-input1" class="swal2-input" autofocus placeholder="User ID">' +
  11. '<input id="swal-input2" class="swal2-input" placeholder="Password">',
  12. preConfirm: function() {
  13. return new Promise(function(resolve) {
  14. if (result) {
  15. resolve([
  16. $('#swal-input1').val(),
  17. $('#swal-input2').val()
  18. ]);
  19. }
  20. });
  21. }
  22. }).then(function(result) {
  23. swal(JSON.stringify(result));
  24. })
  25. }
  26.  
  27. </script>
  28.  
  29. <a onclick="yourFunction()">click here</>
  30.  
  31. <a href="javascript:yourFunction()">click here!</a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement