Alıntı
Alıntı
Bu kodun sadece form submit olunca çalışması için nasıl aktif edilir?
20
●1.654
$(document).on("submit", "#form", function() {
Yapılacak işlemler...
});Detaylı bilgi: http://api.jquery.com/on/<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#icerikekle').html('\
<form id="form">\
<input type="text" name="text1"/>\
<button type="button">Gönder</button>\
</form>\
');
$('#form button').click(function(){
alert("form gönderildi");
});
});
</script>
</head>
<body>
<div id="icerikekle"></div>
</body>
</html>Kolaygelsin..