1、以下代码为html中的js,如果直接在chrome中改变js中的代码不会立即生效
<script>
$("#leForm").submit(function(){
$("#submitButton").hide("fast");
$("#loadingSign").show("slow");
$("#resultsDiv").hide("slow", function(){
var ajaxCall = $.ajax({
type: "POST",
url: "fdb94122d0f032821019c7edf09dc62ea21e25ca619ed9107bcc50e4a8dbc100",
data: {
username: "guest"
},
async: false
});
if(ajaxCall.status == 200)
{
$("#resultsDiv").html(ajaxCall.responseText);
}
else
{
$("#resultsDiv").html("<p> 产生一个错误: " + ajaxCall.status + " " + ajaxCall.statusText + "</p>");
}
$("#resultsDiv").show("slow", function(){
$("#loadingSign").hide("fast", function(){
$("#submitButton").show("slow");
});
});
});
});
$('#hideLesson').click(function(){
$("#lessonIntro").hide("slow", function(){
$("#showLesson").show("fast");
});
});
$("#showLesson").click(function(){
$('#showLesson').hide("fast", function(){
$("#lessonIntro").show("slow");
});
});
</script>
2、针对以上情形,打开chrome的console面板:
输入console然后按enter
在输入要改变的js代码例如:
$('#hideLesson').click(function(){
$("#lessonIntro").hide("slow", function(){
$("#showLesson").show("slow");
});
});
输完后按enter生效