-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyscript.js
32 lines (31 loc) · 1.13 KB
/
myscript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Version: 1.0
// Works for all forms with submit event except form in iframe from cross site
$(document).ready(function() {
// alert("document is ready");
// var str = $( "form" ).serialize();
// console.log(str);
$( "form" ).on( "submit", function( event ) {
alert('just form submit happened');
console.log("Inside submit event")
// var str = $( "form" ).serialize();
alert( $( "form input[type=text]" ).serialize() );
alert( $( "form input[type=password]" ).serialize() );
event.preventDefault();
});
$("input").on("click", function(event){
// event.stopPropagation();
// return false;
alert('we are in input on click');
alert( $( "form input[type=text]" ).serialize() );
alert( $( "form input[type=password]" ).serialize() );
});
$("a").on("click", function(event){
// event.stopPropagation();
// return false;
alert('we are in input on click');
alert( $( "form input[type=text]" ).serialize() );
alert( $( "form input[type=password]" ).serialize() );
alert( $( "input[type=text]" ).serialize() );
alert( $( "input[type=password]" ).serialize() );
})
});