Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a id = "a" onclick = "divFunction()">Forgot Password</a>
- <script type="text/javascript">
- function divFunction(){
- //Some code
- swal({
- title: 'Multiple inputs',
- html: true,
- text: '<h2>Login details for waybill generation</h2>'+
- '<input id="swal-input1" class="swal2-input" autofocus placeholder="User ID">' +
- '<input id="swal-input2" class="swal2-input" placeholder="Password">',
- preConfirm: function() {
- return new Promise(function(resolve) {
- if (result) {
- resolve([
- $('#swal-input1').val(),
- $('#swal-input2').val()
- ]);
- }
- });
- }
- }).then(function(result) {
- swal(JSON.stringify(result));
- })
- }
- </script>
- <a onclick="yourFunction()">click here</>
- <a href="javascript:yourFunction()">click here!</a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement