嗨我想在jsp頁面中添加一些JavaScript,但這是行不通的。下面是我的代碼。javascript在jsp頁面
<head>
<script type="text/javascript">
$(document).ready(function() {
$(".jsscript").fadeTo(20, 0.6);
$(".jsscript").mouseleave(function() {
$(this).fadeTo(800, 0.6);
});
$(".jsscript").mouseenter(function() {
$(this).fadeTo(320, 1);
});
})
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gadgets</title>
</head>
這是我的頭標記使用JavaScript和下面是在去年同一頁
<td align="center"><img class="jsscript" src="images/<%=p.getFileName()%>" width="300"/></td>
你的其他腳本之前加載jquery的?例如。添加''之前的其他腳本標記 – mplungjan
忘記那部分感謝 –