首页 >iOS开发

获取网页 HTML 中 <Title>内容的代码

2010-08-03 14:43 编辑: mac52ipod 分类:iOS开发 来源:CocoaChina

涉及到互联网的 iPhone 应用里往往要抓取网页的内容,您可以用 UIWebView,加载完成后执行 javascript 取得 html 的 title<br /> self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"];<br /> <br /> 当然如果只是取<title> 内容,你可以不把 UIWebView show 出来,用完直接release好了。</p> </div> <div id="page" style="padding:0"></div> <section class="article-footer-label" style=" margin-top: 30px; font-size: 13px;line-height: 1.5; padding: 15px;border: 1px solid #efefef;color: #999; border-radius: 4px;"><div><div>CocoaChina社区转载内容已尽可能注明出处,如未能核实来源或转发内容图片有权利瑕疵的,请及时联系社区进行修改或删除【联系方式QQ : 3442093904 邮箱:support@cocoachina.com】文章内容为作者独立观点,不代表CocoaChina社区立场。版权归原作者所有,如申请授权请联系作者,因文章侵权CocoaChina社区不承担任何法律及连带责任。 </div></div></section> <div class="wx_article"> <div class="article_weixin"> <img src="http://cdn.cocimg.com/cms/templets/images/article_weixin.jpg" width="131" height="131" alt="搜索CocoaChina微信公众号:CocoaChina"/> <div class="article_scan">微信扫一扫</div> <div class="article_txt" ><span style="color:#999999">订阅每日移动开发及APP推广热点资讯<br/>公众号:</span>CocoaChina</div> </div> </div> <div class="clearfix tgbox"> <a href="http://www.cocoachina.com/deliver.php" class="tg float-l" target="_blank">我要投稿</a>   <a style="margin-left:10px" href="javascript:void(0)" onClick="add_favors(1964,'获取网页 HTML 中 <Title>内容的代码')" class="tg float-l" >收藏文章</a> <div class="share float-r">分享到: <div class="bdsharebuttonbox" id="sharediv"><a href="#" class="bds_more" data-cmd="more"></a> <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a> <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div> </div> </div> <a class="zanbox" href="javascript:void(0)" id="zanbox" onClick="postDigg('good',1964)" title="哎呦,不错噢,赞一个" > <strong id="newdigg"> <script src="/cms/plus/count.php?view=yes&digg_id=1964&mid=8" language="javascript"></script> </strong> </a> </div> <div class="article-prev">上一篇:<a href='/ios/20100803/1962.html'>急招 iPhone 开发高手</a> </div> <div class="article-next">下一篇:<a href='/ios/20100803/1966.html'>在iPhone开发领域取得成功的10个技巧与启示</a> </div> <!--相关资讯--> <div class="part-wrap clearfix"> <h3>相关资讯</h3> <ul class="info-list clearfix"> <li> <a href="/ios/20190527/27008.html" target="_blank" title="对于一个闭源系统来说如果想研究某些逻辑的内部实现就需要对汇编语言进行掌握和了解、对于某些需要高性能实现的逻辑来说用汇编语言实现可能是最好的选择、对于某些逻辑来说可能只能用汇编来">深入iOS系统底层之程序中的汇编代码</a> </li> <li> <a href="/ios/20190501/27004.html" target="_blank" title="如果您曾经在CocoaChina代码库上传过代码,亦或者您具有开源精神愿意知识共享,互惠互利~那么欢迎您加入我们的代码库作者群~在这里可以撩大佬、宣传项目和优秀从业者共同交流进步!">CocoaChina代码库社群建立,欢迎进群撩大佬、宣传项目、共同交流进步~</a> </li> <li> <a href="/ios/20190416/26821.html" target="_blank" title="代码块的意义;自定义代码块入口;代码块迁移;代码块的编写">iOS Xcode自定义代码块以及迁移</a> </li> <li> <a href="/ios/20190410/26775.html" target="_blank" title="总体内容:1、逆向课程简介;2、学习逆向的条件;3、iOS越狱(iOS Jailbreak)的优点和缺点;4、完美越狱和非完美越狱以及如何判断是否越狱成功?;5、Cydia(越狱后的App Store);6、iphone/Mac必备软件安装以">iOS逆向-day1:逆向内容的简介与越狱环境搭建</a> </li> <li> <a href="/ios/20190401/26699.html" target="_blank" title="最近换了新工作,第一个需求是写几个列表。简单的UITableView+Cell,但毕竟是入职后的第一个需求感觉要被review,所以还是想尽量弄得优雅一点。">iOS--复数cell下优雅的代码结构</a> </li> <li> <a href="/ios/20190327/26660.html" target="_blank" title="大概从入门 iOS 的青铜段位我们就开始使用 NotificationCenter 实现跨层一对多的消息传递,具体实现代码大概如下">倔强青铜:如何避免写出丑陋的通知代码</a> </li> <li> <a href="/ios/20190315/26573.html" target="_blank" title="iOS项目统计代码行数">iOS项目统计代码行数</a> </li> <li> <a href="/ios/20190313/26553.html" target="_blank" title="让我们看一看flutter的工程目录以及创建项目运行代码的部分解析">Flutter工程解析篇 + 工程代码部分解析记录</a> </li> <li> <a href="/ios/20190311/26524.html" target="_blank" title="良好的编码规范是程序员必备的素质">iOS 注释方法大全 代码块加快捷键注释</a> </li> <li> <a href="/ios/20190308/26510.html" target="_blank" title="最近有点闲功夫,自己总结了一下label自适应的几种方式,现在分享给大家.">iOS label代码自适应高度宽度</a> </li> </ul> </div> <div class="clearfix" style="margin-top:20px;" > <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- CC评论框 --> <ins class="adsbygoogle" style="display:inline-block;width:750px;height:90px" data-ad-client="ca-pub-1180518835303646" data-ad-slot="8242010366"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <!-- 评论模块start --> <div class="clearfix" id="commnet_list_holder" style="margin-bottom:50px;"> <div class="glab-comment-form"> <div class="dcbt">我来说两句</div> <div class="user-head"> <img id="user_face_url" src="http://cdn.cocimg.com/bbs/images/face/none.gif" height="43" width="43" alt=""> </div> <div class="form-region"> <textarea name="comment" id="main_comment_content" cols="30" rows="10" placeholder="你怎么看?快来评论一下吧!"></textarea> <a class="submitform" id="main_comment_bt">发表评论</a> <div class="unlogin-mask"> <div>您还没有登录!请<a href="/bbs/login.php">登录</a>或<a href="/bbs/register.php">注册</a></div> </div> </div> </div> <div id="glab-comment-callback-msg" class="glab-comment-info"></div> <div class="glab-comment-title">所有评论(<span>0</span>)</div> <div class="glab-commentlist" id="commentlist"> <a id="refresh_comment_btn" href="javascript:;" onclick="$('#morecomment').trigger('click')">刷新评论</a> </div> <div class="glab-comment-more" id="morecomment" style="display:none"> 更多评论 </div> </div> <!-- 评论模块end --> </div> <!--./left--> <!--侧边栏--> <div class="clearfix newslist"> <div class="rightSide detail-right float-r" > <!--两周热门资讯推荐--> <div> <div class="part-wrap clearfix"> <h3>热门资讯</h3> <ul class="related-hot"> <li class="clearfix"><a href="http://www.cocoachina.com/ios/20190611/27046.html" class="float-l pic" target="_blank" title="高仿漫画类项目-Swift5版本"><img src="http://cc.cocimg.com/api/uploads/190611/e253072a53d22685f49b02b9fbf64bdc.png" style="max-height:60px" alt="高仿漫画类项目-Swift5版本"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/ios/20190611/27046.html" target="_blank" title="高仿漫画类项目-Swift5版本">高仿漫画类项目-Swift5版本</a></p><p class="hits">点击量<span>6651</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/ios/20190604/27034.html" class="float-l pic" target="_blank" title="WWDC19 苹果宣布全新 UI 框架 SwiftUI"><img src="http://cc.cocimg.com/api/uploads/190604/7241c846ea81bff0a8d52bbe16d1bd09.png" style="max-height:60px" alt="WWDC19 苹果宣布全新 UI 框架 SwiftUI"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/ios/20190604/27034.html" target="_blank" title="WWDC19 苹果宣布全新 UI 框架 SwiftUI">WWDC19 苹果宣布全新 UI 框架 SwiftUI</a></p><p class="hits">点击量<span>5293</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/programmer/20190531/27024.html" class="float-l pic" target="_blank" title="Swift 势必取代 Python?"><img src="http://cc.cocimg.com/api/uploads/190531/2e2abec738c42aa947c1f97d2ba10590.png" style="max-height:60px" alt="Swift 势必取代 Python?"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/programmer/20190531/27024.html" target="_blank" title="Swift 势必取代 Python?">Swift 势必取代 Python?</a></p><p class="hits">点击量<span>4604</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/ios/20190606/27040.html" class="float-l pic" target="_blank" title="iOS多线程开发:几个容易被忽略的细节"><img src="http://cc.cocimg.com/api/uploads/190606/171dd1513590d416f3f188eaf3938a37.png" style="max-height:60px" alt="iOS多线程开发:几个容易被忽略的细节"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/ios/20190606/27040.html" target="_blank" title="iOS多线程开发:几个容易被忽略的细节">iOS多线程开发:几个容易被忽略的细节</a></p><p class="hits">点击量<span>2975</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/ios/20190604/27035.html" class="float-l pic" target="_blank" title="iOS13-适配夜间模式/深色外观(Dark Mode)"><img src="http://cc.cocimg.com/api/uploads/190604/51ac4379aafcf748971a7338ea90b967.png" style="max-height:60px" alt="iOS13-适配夜间模式/深色外观(Dark Mode)"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/ios/20190604/27035.html" target="_blank" title="iOS13-适配夜间模式/深色外观(Dark Mode)">iOS13-适配夜间模式/深色外观(Dark Mode)</a></p><p class="hits">点击量<span>2401</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/ios/20190531/27025.html" class="float-l pic" target="_blank" title="解读 iOS 组件化与路由的本质"><img src="http://cc.cocimg.com/api/uploads/190531/1c1a01172ec2617896ac846938fb5d0f.png" style="max-height:60px" alt="解读 iOS 组件化与路由的本质"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/ios/20190531/27025.html" target="_blank" title="解读 iOS 组件化与路由的本质">解读 iOS 组件化与路由的本质</a></p><p class="hits">点击量<span>2277</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/programmer/20190603/27027.html" class="float-l pic" target="_blank" title="阿里面试,我挂在了第四轮……"><img src="http://cc.cocimg.com/api/uploads/190603/38227dcf3e19a0b2f89970ba3c6fbf54.png" style="max-height:60px" alt="阿里面试,我挂在了第四轮……"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/programmer/20190603/27027.html" target="_blank" title="阿里面试,我挂在了第四轮……">阿里面试,我挂在了第四轮……</a></p><p class="hits">点击量<span>2185</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/apple/20190603/27029.html" class="float-l pic" target="_blank" title="苹果WWDC 2019最全剧透抢先看:三大操作系统将重磅更新"><img src="http://cc.cocimg.com/api/uploads/190603/ed962ed8e6e3ba1c96021c86f706a815.png" style="max-height:60px" alt="苹果WWDC 2019最全剧透抢先看:三大操作系统将重磅更新"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/apple/20190603/27029.html" target="_blank" title="苹果WWDC 2019最全剧透抢先看:三大操作系统将重磅更新">苹果WWDC 2019最全剧透抢先看:三大操作系统将重磅更新</a></p><p class="hits">点击量<span>2084</span></p></div></li><li class="clearfix"><a href="http://www.cocoachina.com/apple/20190605/27037.html" class="float-l pic" target="_blank" title="iPadOS 抢先体验:这是一次属于 iPad 的成人礼"><img src="http://cc.cocimg.com/api/uploads/190605/4d4e3423ced2ce6674a83ae9f7bee38e.png" style="max-height:60px" alt="iPadOS 抢先体验:这是一次属于 iPad 的成人礼"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/apple/20190605/27037.html" target="_blank" title="iPadOS 抢先体验:这是一次属于 iPad 的成人礼">iPadOS 抢先体验:这是一次属于 iPad 的成人礼</a></p><p class="hits">点击量<span>2078</span></p></div></li><li class="clearfix noborder-b"><a href="http://www.cocoachina.com/apple/20190604/27033.html" class="float-l pic" target="_blank" title="快速回顾 WWDC 2019 重点:硬件、软件全都有"><img src="http://cc.cocimg.com/api/uploads/190604/fc81df7ff3c9f9820242cb7051b6df10.png" style="max-height:60px" alt="快速回顾 WWDC 2019 重点:硬件、软件全都有"/></a><div style="margin-left:86px"><p class="related-intro"><a href="http://www.cocoachina.com/apple/20190604/27033.html" target="_blank" title="快速回顾 WWDC 2019 重点:硬件、软件全都有">快速回顾 WWDC 2019 重点:硬件、软件全都有</a></p><p class="hits">点击量<span>2067</span></p></div></li> </ul> </div> </div> <!--./两周热门资讯推荐--> <!--综合评论--> <div class="part-wrap clearfix" style="margin-top: 15px;"> <h3>综合评论</h3> <ul class="related-comment clearfix" id="all_comments_holder"> <li><span class="hide_comment">请问 那个排名怎么没见华为</span><br/><p><span>WooY</span><span>评论了</span><a href="http://www.cocoachina.com/programmer/20190613/27052.html" title="程序员视角看互联网女皇报告:移动开发进入拐点,云计..." target="_blank" ><span>程序员视角看互联网女皇报告:移动开发进入拐点,云计...</span></a></p></li><li><span class="hide_comment">青花瓷可以导入其他证书</span><br/><p><span>a54176540</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190611/27047.html" title="iOS开发如何避免安全隐患" target="_blank" ><span>iOS开发如何避免安全隐患</span></a></p></li><li><span class="hide_comment">图都看不到,就看到狼人了</span><br/><p><span>supercroft</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190612/27048.html" title="Swift 5.1 新特性:透明类型关键字 som..." target="_blank" ><span>Swift 5.1 新特性:透明类型关键字 som...</span></a></p></li><li><span class="hide_comment">demo 地址 https://download.csdn.net/download/qq_31332367/11237290</span><br/><p><span>天上一只大鹅</span><span>评论了</span><a href="http://www.cocoachina.com/industry/20101108/2312.html" title="iOS 4.2 将支持 MIDI" target="_blank" ><span>iOS 4.2 将支持 MIDI</span></a></p></li><li><span class="hide_comment">图片内容错误已更新</span><br/><p><span>SepCode</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190610/27042.html" title="简单易懂iOS面试篇" target="_blank" ><span>简单易懂iOS面试篇</span></a></p></li><li><span class="hide_comment"> 中间人攻击的前提是客户端信任了劫持者的证书中心,要不然客户端如何对劫持者的公钥加密的内容进行解密呢,楼主这里说的不够详细。</span><br/><p><span>jzx6035311</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190611/27047.html" title="iOS开发如何避免安全隐患" target="_blank" ><span>iOS开发如何避免安全隐患</span></a></p></li><li><span class="hide_comment">学这个 我还不如入Flutter的坑</span><br/><p><span>qq502183572</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190604/27034.html" title="WWDC19 苹果宣布全新 UI 框架 Swift..." target="_blank" ><span>WWDC19 苹果宣布全新 UI 框架 Swift...</span></a></p></li><li><span class="hide_comment">别扶我,我就死OC上了<br></span><br/><p><span>wangct</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190604/27034.html" title="WWDC19 苹果宣布全新 UI 框架 Swift..." target="_blank" ><span>WWDC19 苹果宣布全新 UI 框架 Swift...</span></a></p></li><li><span class="hide_comment">扶我起来,我还能学!</span><br/><p><span>Nakee</span><span>评论了</span><a href="http://www.cocoachina.com/ios/20190604/27034.html" title="WWDC19 苹果宣布全新 UI 框架 Swift..." target="_blank" ><span>WWDC19 苹果宣布全新 UI 框架 Swift...</span></a></p></li><li class="noborder-b"><span class="hide_comment">优秀,阿里面试基本功很重要,前年面试过,第一轮就挂了,太菜了。</span><br/><p><span>longdawei1988</span><span>评论了</span><a href="http://www.cocoachina.com/programmer/20190603/27027.html" title="阿里面试,我挂在了第四轮……" target="_blank" ><span>阿里面试,我挂在了第四轮……</span></a></p></li> </ul> </div> <!--./综合评论--> <!--相关帖子--> <div class="part-wrap clearfix" style="margin:15px 0 15px 0;"> <h3>相关帖子</h3> <ul class="related-comment clearfix"> <script charset="gb2312" src="http://www.cocoachina.com/bbs/new.php?action=article&fidin=21_18_2_8_19_41_59_48_56_14_36_5&digest=0&postdate=0&author=0&fname=0&hits=0&replies=0&pre=0&num=10&length=100&order=2&like=ios#"></script> </ul> </div> <!--./相关帖子--> <iframe width="230" height="550" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=230&height=550&fansRow=2&ptype=1&speed=0&skin=5&isTitle=1&noborder=1&isWeibo=1&isFans=0&uid=1659808677&verifier=6043be56&dpc=1"></iframe> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- CC列表页面230x230 --> <ins class="adsbygoogle" style="display:inline-block;width:230px;height:230px" data-ad-client="ca-pub-1180518835303646" data-ad-slot="6765277166"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <!--./侧边栏--> </div> <div id="coco-store" style="display:none"> <div class="storebox"> <h5>提示</h5> <h3>已经收藏该篇文章</h3> <p class="p1"><a href="/bbs/u.php?action=favor&tag=1" target="_blank">去我的收藏夹</a></p> <p class="p2"><a href="/bbs/login.php">请登录</a></p> </div> </div> <!--收藏提示--> </div> <script type="text/javascript"> function postDigg(ftype,aid) { var taget_obj = document.getElementById('newdigg'); var saveid = GetCookie('diggid'); if(saveid != null) { var saveids = saveid.split(','); var hasid = false; saveid = ''; j = 1; for(i=saveids.length-1;i>=0;i--) { if(saveids[i]==aid && hasid) continue; else { if(saveids[i]==aid && !hasid) hasid = true; saveid += (saveid=='' ? saveids[i] : ','+saveids[i]); j++; if(j==20 && hasid) break; if(j==19 && !hasid) break; } } if(hasid) { alert("您已经顶过该帖,请不要重复顶帖 !"); return; } else saveid += ','+aid; SetCookie('diggid',saveid,1); } else { SetCookie('diggid',aid,1); } myajax = new DedeAjax(taget_obj,false,false,'','',''); var url = "/cms/plus/digg_ajax.php?action="+ftype+"&id="+aid; myajax.SendGet2(url); DedeXHTTP = null; $('#zanbox').addClass('zanbox-selected'); } function getDigg(aid) { var taget_obj = document.getElementById('newdigg'); myajax = new DedeAjax(taget_obj,false,false,'','',''); myajax.SendGet2("/cms/plus/digg_ajax.php?id="+aid); DedeXHTTP = null; } //显示对应的导航: $(function(){ var article_id = $('#article_id').val(); var saveid = GetCookie('diggid'); if(saveid != null) { var saveids = saveid.split(','); var hasid = false; saveid = ''; j = 1; for(i=saveids.length-1;i>=0;i--) { if(saveids[i]==article_id && hasid) continue; else { if(saveids[i]==article_id && !hasid) hasid = true; saveid += (saveid=='' ? saveids[i] : ','+saveids[i]); j++; if(j==20 && hasid) break; if(j==19 && !hasid) break; } } if(hasid) { $('#zanbox').addClass('zanbox-selected'); } } }); window.onload = function() { $('#sharediv').removeClass('bdshare-button-style1-32'); $('#sharediv').attr('class','bdsharebuttonbox'); }; </script> <script type="text/javascript" src="http://cdn.cocimg.com/cms/templets/js/shCore.js"></script> <script type="text/javascript" src="http://cdn.cocimg.com/cms/templets/js/brush.js"></script> <link type="text/css" rel="stylesheet" href="http://cdn.cocimg.com/cms/templets/style/shCoreDefault.css"/> <script type="text/javascript"> //SyntaxHighlighter.config.clipboardSwf = '/js/scripts/clipboard.swf'; SyntaxHighlighter.all();</script> <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"获取网页 HTML 中 <Title>内容的代码 - 来自CocoaChina苹果开发中文站@CocoaChina","bdMini":"2","bdMiniList":false,"bdPic":"/cms/images/defaultpic.gif","bdStyle":"1","bdSize":"32"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api//js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script> <!--./cont--> <!-- 回复评论框模板 --> <script type="text/javascript" src="http://cdn.cocimg.com/cms/templets/js/comment.js?v=20151019"></script> <script type="text/javascript" src="http://cdn.cocimg.com/cms/templets/js/mustache.min.js"></script> <!-- 回复评论框模板 --> <script id="reply_comment_template" type="x-tmpl-mustache"> <div id="sub-reply-comment" class="reply-comment"> <textarea name="subcomment" id="sub-reply-txt" cols="30" rows="10" placeholder="你怎么看?快来评论一下吧!"></textarea> <input type="hidden" id="sub-reply-id" value="{{commentid}}" /> <input type="hidden" id="sub-reply-userid" value="{{parentuserid}}" /> <input type="hidden" id="sub-reply-username" value="{{parentusername}}" /> <a type="button" id="sub_comment_bt" class="submitbt">提交</a> <div class="clearfloat"></div> <div class="unlogin-mask"> <div>您还没有登录!请<a href="/bbs/login.php">登录</a>或<a href="/bbs/register.php">注册</a></div> </div> </div> </script> <!-- 评论模板 --> <script id="main_comment_template" type="x-tmpl-mustache"> <div class="glab-comment" rel-data-id="{{comment_id}}" rel-user-id="{{user_id}}" rel-user-name="{{user_name}}" rel-layer="1"> <div class="comment-left"> <a href="/bbs/u.php?action=feed&uid={{user_id}}" target="_blank"><img src="{{user_icon_url}}" height="43" width="43" alt=""></a> </div> <div class="comment-right"> <div class="comment-author"><a href="/bbs/u.php?action=feed&uid={{user_id}}" target="_blank">{{user_name}}</a><span class="puptime">{{create_time}}</span></div> <div class="comment-content">{{&content}}</div> <div class="comment-buttons"> <span class="ding"> <img src="http://cdn.cocimg.com/cms/templets/images/zan-default.png" height="14" width="14" alt="" class="default" style="{{#has_supported}} display:none; {{/has_supported}}"> <img src="http://cdn.cocimg.com/cms/templets/images/zan-active.png" height="14" width="14" alt="" class="actived" style="{{^has_supported}} display:none; {{/has_supported}}"> <span class="zancnt">{{support}}</span> </span> <span class="cai"> <img src="http://cdn.cocimg.com/cms/templets/images/cai-default.png" height="14" width="14" alt="" class="default" style="{{#has_reported}} display:none; {{/has_reported}}"> <img src="http://cdn.cocimg.com/cms/templets/images/cai-active.png" height="14" width="14" alt="" class="actived" style="{{^has_reported}} display:none; {{/has_reported}}"> <span class="zancnt">{{report}}</span> </span> <span class="replybt">回复</span> </div> </div> {{#sub}} <div class="glab-comment glab-sub-comment" rel-data-id="{{comment_id}}" rel-user-id="{{user_id}}" rel-user-name="{{user_name}}" rel-layer="2"> <div class="comment-left"> <a href="/bbs/u.php?action=feed&uid={{user_id}}" target="_blank"><img src="{{user_icon_url}}" height="43" width="43" alt=""></a> </div> <div class="comment-right"> <div class="comment-author"><a href="/bbs/u.php?action=feed&uid={{user_id}}" target="_blank">{{user_name}}</a><span class="puptime">{{create_time}}</span></div> <div class="comment-content"><a href="/bbs/u.php?action=feed&uid={{parent_user_id}}" target="_blank">回复:{{parent}}</a>{{&content}}</div> <div class="comment-buttons"> <span class="ding"> <img src="http://cdn.cocimg.com/cms/templets/images/zan-default.png" height="14" width="14" alt="" class="default" style="{{#has_supported}} display:none; {{/has_supported}}"> <img src="http://cdn.cocimg.com/cms/templets/images/zan-active.png" height="14" width="14" alt="" class="actived" style="{{^has_supported}} display:none; {{/has_supported}}"> <span class="zancnt">{{support}}</span> </span> <span class="cai"> <img src="http://cdn.cocimg.com/cms/templets/images/cai-default.png" height="14" width="14" alt="" class="default" style="{{#has_reported}} display:none; {{/has_reported}}"> <img src="http://cdn.cocimg.com/cms/templets/images/cai-active.png" height="14" width="14" alt="" class="actived" style="{{^has_reported}} display:none; {{/has_reported}}"> <span class="zancnt">{{report}}</span> </span> <span class="replybt">回复</span> </div> </div> </div> {{/sub}} </div> </script> <script id="sub_comment_template" type="x-tmpl-mustache"> <div class="glab-comment glab-sub-comment" rel-data-id="{{comment_id}}" rel-user-id="{{user_id}}" rel-user-name="{{user_name}}" rel-layer="2"> <div class="comment-left"> <a href="/bbs/u.php?action=feed&uid={{user_id}}" target="_blank"><img src="{{user_icon_url}}" height="43" width="43" alt=""></a> </div> <div class="comment-right"> <div class="comment-author"><a href="/bbs/u.php?action=feed&uid={{user_id}}" target="_blank">{{user_name}}</a><span class="puptime">{{create_time}}</span></div> <div class="comment-content"><a href="/bbs/u.php?action=feed&uid={{parent_user_id}}" target="_blank">回复:{{parent}}</a>{{&content}}</div> <div class="comment-buttons"> <span class="ding"> <img src="http://cdn.cocimg.com/cms/templets/images/zan-default.png" height="14" width="14" alt="" class="default" style="{{#has_supported}} display:none; {{/has_supported}}"> <img src="http://cdn.cocimg.com/cms/templets/images/zan-active.png" height="14" width="14" alt="" class="actived" style="{{^has_supported}} display:none; {{/has_supported}}"> <span class="zancnt">{{support}}</span> </span> <span class="cai"> <img src="http://cdn.cocimg.com/cms/templets/images/cai-default.png" height="14" width="14" alt="" class="default" style="{{#has_reported}} display:none; {{/has_reported}}"> <img src="http://cdn.cocimg.com/cms/templets/images/cai-active.png" height="14" width="14" alt="" class="actived" style="{{^has_reported}} display:none; {{/has_reported}}"> <span class="zancnt">{{report}}</span> </span> <span class="replybt">回复</span> </div> </div> </div> </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-68948817-1', 'auto', {'name': 'newTracker'}); ga('newTracker.send', 'pageview'); </script> </div> <!--右侧浮动--> <div class="r-bar"> <img src="http://cdn.cocimg.com/cms/templets/images/coco_weixin.png" class="weixin"> <a href="http://weibo.com/cocoachina" target="_blank" title="" class="weibo">sina</a> <a href="javascript:void(0);" target="_blank" title="" class="feedback">weixin</a> <a href="mailto:support@cocoachina.com" title="" class="kefu">mail</a> <a href="javascript:;" title="回到顶部" class="returntop">回到顶部</a> </div> <script language="javascript" src="/cms/bbsauth_plus2015.php" type="text/javascript"></script> <script type="text/javascript"> $(function(){ if (typeof(_user_info_html) != 'undefined' && _user_info_html) { $('.nav-user-login').hide(); $('.nav-user-name').html(_user_info_html).show(); } var type = $('#type_name').html(); if(type) { switch( type ) { case 'iOS开发': $('#ios').addClass('light'); break; case 'AppStore研究': $('#app_store').addClass('light'); break; case 'Mac开发': $('#mac').addClass('light'); break; case '产品设计': $('#design').addClass('light'); break; case 'Cocos引擎': $('#cocos').addClass('light'); break; case 'WebApp': $('#webapp').addClass('light'); break; case 'Swift': $('#swift').addClass('light'); break; case '游戏开发': $('#game').addClass('light'); break; case '苹果相关': $('#apple').addClass('light'); break; case '营销推广': $('#market').addClass('light'); break; case '业界动态': $('#industry').addClass('light'); break; case '程序人生': $('#programmer').addClass('light'); break; } } }); </script> <!--./cont--> <script type="text/javascript" src="/cms/templets/js/index.js?20111546514"></script> <script src="http://cdn.cocimg.com/cms/templets/js/jquery.colorbox-min.js" type="text/javascript"></script> <script src="/cms/templets/js/script.js?t=2045479411" type="text/javascript"></script> <script type="text/javascript"> jQuery(function() { //更改文章来源 var source = $('#source a').html(); if( source == '未知' ) jQuery('#source a').html('CocoaChina'); if( jQuery('#source a').attr('href')=='') jQuery('#source').html('来源:'+source); //获取用户登录的id // var content = jQuery('.t-lid').attr("href"); // var uid = 0; // if( content ) // { // content = content.split('='); // uid = content[1]; // } // var timestamp = new Date().getTime(); // var uid2 = parseInt(uid); // if(uid2==uid && uid2!=0){ // uid = uid<<2; // uid = uid+''+timestamp; // }else{ // uid = ""; // } // var oIframe=document.getElementById("comiframe"); // if(oIframe){ // var oUrl=window.location.href; // oUrl = encodeURIComponent(oUrl); // // oIframe.src="/comment.php?url="+oUrl+"&uid="+uid; // } }); </script> <!--footer--> <div class="footer clearfix"> <div class="footer-b"> <div> <a href="/aboutus/agrement/index.html" target="_blank">用户协议</a> <a href="/aboutus/quanli/index.html" target="_blank">权利声明</a> <a href="/aboutus/yinsi/index.html" target="_blank">隐私协议</a> <a href="/aboutus/index.html" target="_blank">关于我们</a> <a href="/contactus/index.html" target="_blank">商务合作</a> <a href="mailto:support@cocoachina.com" target="_blank">联系我们</a> <a href="/corps" target="_blank">合作伙伴</a> <a href="http://www.upyun.com" target="_blank">本站CDN由又拍云提供服务</a> </div> <p class="footer-b-p">北京触控科技有限公司版权所有 </p> <p> ©2018 Chukong Technologies,Inc. <i> <a href="http://www.miibeian.gov.cn/" target="_blank">京ICP备 11006519号  京ICP证 100954号</a> <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502037140" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"> <img src="http://cdn.cocimg.com/images/gongan.jpg" style="margin: 0px 5px 0px 5px;" />京公网安备 11010502037140号 </a> <a href="http://182.131.21.137/ccnt-apply/admin/business/preview/business-preview!lookUrlRFID.action?main_id=A580B24B1AE846CE9DA949026D63939F" target="_blank"> <img src="http://cdn.cocimg.com/cms/templets/images/jingwen.png" style="margin: -10px auto -14px -10px;" /> 京网文[2015]0630-260号 </a> </i> </p> </div> </div> <!--./footer--> <script language="javascript" type="text/javascript" src="/cms/include/dedeajax2-min.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-16940817-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function search_check() { var search_keyword = $('#search_keyword').val(); if( search_keyword.length < 2 ) { alert("搜索关键字不能少于2个字节,请重新输入。"); } else { $('#searchform').submit(); } } </script> </body> </html>