jsGears.com 技術論壇 - AJAX, JavaScript, jQuery, 網站開發, 前端效能優化's Archiver

awelkije 發表於 2009-12-2 15:21

[Jquery Block]請問這段語法在ie7會有問題 該如何解決?

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jquery.blockUI.js"></script>

<script>
$(document).ready(function(){
                  
$("#test").click(function(){
        $("#bbb").parent().block({ message: null });
});                                                  
                                                  
});
</script>
</head>

<body>
<input type="button" name="test" id="test" value="按鈕" />
<div id="aaa"><img src="3.jpg" name="bbb" id="bbb" /></div>
</body>
</html>[/code]點了按鈕之後 div id為aaa的會block起來
可是在ie7會連同整個頁面變黑
其他瀏覽器 firefox opera chorme正常

wmh 發表於 2009-12-2 16:12

我印象中搭配 jquery 1.2.6 好像沒有這個問題,可以試試看。

awelkije 發表於 2009-12-2 17:36

我把jquery.blockUI.js換成舊版的就好了
真怪

頁: [1]

Powered by Discuz! Archiver  © 2001-2009 Comsenz Inc.