Dreamweaver在文件中显示错误
jquery.jig.js
文件是这个
jQuery(document).ready(function(){
$('#contactform').submit(function(){
var action = $(this).attr('action');
$('#submit').attr('disabled','disabled').after('<img src="contact-form/assets/ajax-loader.gif" class="loader" />');
$("#message").slideUp(750,function() {
$('#message').hide();
$.ajax({
type:"POST",
url: "yourPhpFileURL.php", //put the url of your php file here
data: $('#contactform').serialize(),
success: function(data){
document.getElementById('message').innerHTML = data;
$('#message').slideDown('slow');
$('#contactform img.loader').fadeOut('fast',function(){$(this).remove()});
$('#submit').removeAttr('disabled');
if(data.match('success') != null) $('#contactform').slideUp('slow');
if(data.match('success') != null) $("html,body").animate({
scrollTop: $("#message").offset().top
}, 1000, function(){
});
if(data.match('success') == null) $("html,body").animate({
scrollTop: $("#message").offset().top
}, 1000, function(){
//scroll complete function
});
}
});
});
return false;
});
});
错误显示在最后一行,但我无法理解原因。