몇 가지 jQuery/JavaScript 이벤트/메소드를 실행 중이며 잠시 동안 만 작업하면 전체 문서가 이전 콘텐츠로 다시 돌아갑니다. 어째서?jQuery 메서드가 영구적이지 않습니까?
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//jquery
$("#f").submit(function(){
$("h3").toggle();
//alert("hello");
});
$("button").click(function(){
alert("ZZZZZ");
});
});
</script>
<title>Catalog Nova Grup</title>
</head>
<body>
<center>
<h3 style="color:#00F">Catalog Nova Grup</h3>
</center>
<form id="f">
<select id="s1">
<option>---</option>
<option>ZZZ</option>
</select>
<select id="s2"></select>
<select id="s3"></select>
<input type="submit" id="sb" />
</form>
<button>ZZZ</button>
</body>
</html>
일부 html 및 js 코드를 게시하십시오. –