jQuery实现的功能 有一个编辑器想添加插入图片功能,点击插入自动打开一个百度图片搜索,点击图片即可获取图片到编辑器,能实现吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 已经成功了<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>jquery获取json数据演示页面</title> <script type="text/javascript" src="http://www.oschina.net/js/2011/jquery-1.5.1.min.js"></script> <style>img{width:100px;} p{float:left;}</style> <script type="text/javascript"> jQuery.ajax({ url: 'http://image.baidu.com/i?tn=baiduimagejson&word=美女 ', type: 'POST', dataType: 'jsonp', scriptCharset: 'GBK', success: function(data, textStatus, xhr) { var html="", i=0; jQuery.each(data.data, function(index, val) { title = val.fromPageTitleEnc; titleNoFormatting = val.fromPageTitle; picUrl = val.middleURL; //百度缓存图片 itemUrl = val.objURL; //图片地址 originalContextUrl= val.fromURLHost; //网页地址 unescapedUrl = val.objURL; //图片地址 html += '<p><img src="' + itemUrl + '"/><br/>'+originalContextUrl+'<br/></p>'; i++; if(i >= 628) return false; }); $('#list').after(html); }, error: function(xhr, textStatus, errorThrown) { //called when there is an error }}); </script></head><body> <input id="Button1" type="button" value="获取数据" onclick="getData()" /> <ul id="list"></ul></body></html> jquery的click事件和网页的焦点问题 新手求助标准化 relatedTarget 关于移动触发事件的问题 window.close 报out of memory错误 JS截取字符串 求梅花雪的 treeview 代码 调用iE的另存 如何利用Javascript在客户端取得服务器端时间?我想做一个服务器端时间的倒计时,请高手指点!! 关于客户端owc自动下载的问题,急! 请教:如何使文件菜单里的《另存为》按钮失效? 连接图片上如何放一个播放按钮 jquery选择器
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jquery获取json数据演示页面</title>
<script type="text/javascript" src="http://www.oschina.net/js/2011/jquery-1.5.1.min.js"></script>
<style>img{width:100px;}
p{float:left;}</style>
<script type="text/javascript"> jQuery.ajax({
url: 'http://image.baidu.com/i?tn=baiduimagejson&word=美女 ',
type: 'POST',
dataType: 'jsonp',
scriptCharset: 'GBK',
success: function(data, textStatus, xhr) {
var html="", i=0;
jQuery.each(data.data, function(index, val) {
title = val.fromPageTitleEnc;
titleNoFormatting = val.fromPageTitle;
picUrl = val.middleURL; //百度缓存图片
itemUrl = val.objURL; //图片地址
originalContextUrl= val.fromURLHost; //网页地址
unescapedUrl = val.objURL; //图片地址
html += '<p><img src="' + itemUrl + '"/><br/>'+originalContextUrl+'<br/></p>';
i++;
if(i >= 628) return false;
});
$('#list').after(html);
},
error: function(xhr, textStatus, errorThrown) {
//called when there is an error
}
});
</script>
</head>
<body>
<input id="Button1" type="button" value="获取数据" onclick="getData()" />
<ul id="list"></ul>
</body>
</html>