我想用jqtouch JS庫,所以我嘗試使用功能的它什麼都不顯示插入圖像,但是當我不使用功能,那麼它的正常工作,也用的document.getElementById(使圖庫視圖裏面插入的div圖像「#」)。innerHTML的,也沒有工作時,我只需插入圖像顯示它所以plz幫助嘗試使用功能
<script>
function fun(){
$("#thumbs_container").append('<ul id="thumbs" class="thumbView" style="display:none;"><li class="pic"><a href="#photo_container"><img src="thumbs/1.jpg" alt="images/1.jpg" title="this is a description"/></a></li></ul>');
}
</script>
<body onLoad="fun();">
<div id="about" class="selectable">
<p><img src="codropsIcon.png"/></p>
<p>
<strong>Wonderwall Image Gallery</strong>
<a href="http://www.codrops.com">By Codrops</a>
</p>
<p>A web app created with <br /> <strong>jQTouch</strong></p>
<p><br /><br /><a href="#" class="grayButton goback">Close</a></p>
</div>
<!-- The list of images (thumbs) -->
<div id="thumbs_container" class="current">
<div class="toolbar">
<h1>Thumbs</h1>
<a class="button slideup" id="infoButton" href="#about">About</a>
</div>
<!--<ul id="thumbs" class="thumbView" style="display:none;">
<li class="pic"><a href="#photo_container"><img src="thumbs/1.jpg" alt="images/1.jpg" title="this is a description"/></a></li>
<li class="pic"><a href="#photo_container"><img src="thumbs/2.jpg" alt="images/2.jpg" title="great!"/></a></li>
</ul>-->
</div>
<!-- The single image container -->
<div id="photo_container">
<div class="toolbar">
<h1>Photo</h1>
<a class="back" href="#thumbs_container">Photos</a>
<a class="button slideup" id="infoButton" href="#about">About</a>
</div>
<div class="loader" style="display:none;"></div>
<div id="theimage" class="singleimage"></div>
<div class="descriptionWrapper">
<p id="description"></p>
<div id="prev" style="display:none;"></div>
<div id="next" style="display:none;"></div>
</div>
</div>
</body>
</html>
thaku SOOOO多:)它的工作。 –