Ben*_*Ben 9 html javascript jquery
我正在临时将内容添加到div,tempDiv,并将其添加到附加到显示的div #contentHere的链接上.我需要清除tempDiv的内容,以便链接不会相互附加,创建一个不链接到任何地方的URL字符串.
$(document).ready(function(){
$.getJSON("data.php", function(data){
for(i = 0; i < 5; i++){
$("#tempDiv").append(data.justIn[i].dataLink+ ' ');
$("#contentHere").append("<a href=\"#tempDiv\">Click to go to the div link</a>");
//I need to clear the contents of tempDiv here
}
});
});
Run Code Online (Sandbox Code Playgroud)
我去的时候清除div的临时内容的解决方案?
| 归档时间: |
|
| 查看次数: |
14816 次 |
| 最近记录: |