一图胜千言:
问题:
图文如何排版才能整体起到 anchor 的作用?
最佳答案
制作你的html
var varhtml="<div id="somid">// give background url as image
text goes here
</div>"
('#parentHtmlid').append(varhtml); or
('#parentHtmlid').html(varhtml); if you have place holder
$('#someid').live('click', function() { // as this id added at run time use live in document.ready//
location.href="http://yoururl";
});
关于javascript - 动态组合图像和文本并使整个 div 用作超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4357205/