jQuery İçine Php Kodu Ekleme |
3 Mesajlar | 7.649 Okunma |
<script> kod buraya </script>
$(document).ready(function(){
var sinir = ;
$("#tb1").keyup(function(){
if($(this).val().length > sinir) $(this).val($(this).val().substring(0,sinir));
$("#sonuc").html($("#tb1").val().length + " - ");
}).focus(function(){
$(this).css("background-color","maroon").css("color","white").css("border","solid 1px white");
}).blur(function(){
$(this).css("background-color","white").css("color","maroon").css("border","solid 1px gray");
});
});
<script>
function ajax() {
$.ajax({
type: "POST",
url: "ajax.php",
data: $('form#hesapform').serialize(),
success: function(ajaxcevap){
$('#sonuc').html(ajaxcevap + '
').slideDown('slow');
}
});
}
</script>