快速的拷贝页面元素为html,如何将html元素填充到另一个页面中?

这是的script.js 我jQuery的功能,此功能使用来从闪烁的进料和填充结构。如何将html元素填充到另一个页面中?

我想填充HTML结构到另一个名为html页面“items.html”

$function getImages(){

$.getJSON("http://api.flickr.com/services/feeds/[email protected]&lang=en-us&format=json&jsoncallback=?", displayImages);

function displayImages(data) {

// Start putting together the HTML string

var htmlString = '';

// Now start cycling through our array of Flickr photo details

$.each(data.items, function(i,item){

// Here's where we piece together the HTML

htmlString += '

';

htmlString += '';

htmlString += '

';

htmlString += '

';

htmlString += '

'+item.title+'

';

htmlString += '

';

htmlString += '

';

htmlString += '

'+item.title+'

';

htmlString += '

'+item.title+'

';

htmlString += '

'+item.title+'

';

htmlString += '

';

htmlString += '

';

htmlString += '

';

});

// Pop our HTML in the DIV tag of items.html

// Here's the problem.

$('div').html(htmlString);

}

}

所以,我该怎么办呢? 谢谢!

+0

如果您仍然需要使用您的问题,您应该添加更多的信息到您的文章帮助;主要是,你正在努力为你的用户提供哪些功能。你所问的技术问题是好的,但由于你对HTML和jQuery的经验是新手(你的话:P),你很有可能以其他方式达到你想要完成的目标。 –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值