<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="plugin/easyui/themes/gray/easyui.css">
<link rel="stylesheet" type="text/css" href="plugin/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="style/main.css">
<script type="text/javascript" src="plugin/easyui/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$("#closeMe").click(function() {
$(this)
.parent()
.slideUp();
});
</script>
</head>
<body>
<div id="rem">
<span id="closeMe"><img src="http://www.cespage.com/silverlight/appbar/dark/close.png"></span>
<p>Please read the documentation.For updates please follow our blog, tweets or become a fan.</p>
</div>
</body>
</html>
這是一個帶關閉按鈕的簡單框,一旦按下,它就會向上滑動。但是,當我測試它,我按下按鈕,沒有反應。問題是什麼?謝謝。爲什麼在這種情況下無法啓動腳本
你使用的是什麼瀏覽器。某些版本的IE不會將點擊事件綁定到非A標籤。 – 2012-02-17 05:40:31
從來沒有聽說過這個問題,j_mcnally。你確定?無論如何,真正的問題是文件還沒有準備好。 – 2012-02-17 05:42:40
@j_mcnally - 這IE的版本會是這樣?它在5.5以後的所有版本中都適用於我(之前我不記得以前的版本),儘管我只使用了Windows版本...... – nnnnnn 2012-02-17 05:43:28