<div class="codetitle"> <span><a style="CURSOR: pointer" data="15079" class="copybut" id="copybut15079" onclick="doCopy('code15079')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code15079"> <br><?php <BR>$str = file("http://tq.tom.com/china/index.html"); <br>$count = count($str); <br>for ($i=0;$i $file .= $str[$i]; <br>} <br>$tomtq = explode("<table>",$file); <br>$tomtq = explode("</table>",$tomtq[1]); <br>$tomtq= $tomtq[0]; <br>//$tomtq tom天气小偷 <br>?> <br> </div> <br><br>天气预报 code来的 <br><br><br><br><br><div class="htmlarea"> <textarea id="runcode23365"> <meta http-equiv="Content-Type" c> <title>天气预报</title> <style type="text/css"> <!-- td { font-size: 12px; } --> </style> <script language="JavaScript" type="text/JavaScript"> <!-- var openW; function openWindow(theURL,winName,features) { //v2.0 //openW=window.open(theURL,winName,features); //var mxh2 = window.open("about:blank","window_mxh") //var mxh2 =window.open(theURL,winName,features); window.showModalDialog(theURL,test(),'dialogHeight:270px;dialogWidth:265px;scroll:no;status:no') } function test(){ location.href="index.htm"; } //--> </script> <script language="javascript" id="objscript"></script> <script language="JavaScript" type="text/JavaScript" src="http://www.116.com.cn/116/home/weather/public.js"></script> <script language="JavaScript" type="text/JavaScript" src="http://www.116.com.cn/116/home/weather/weather.js"></script> <script language="JavaScript" type="text/JavaScript" src="http://jsp.116.com.cn/notice/iptocityid.jsp"></script> <script language="JavaScript"> var locid; var cityname; var defid; if(getCookie("defid")=='') { locid=CityID; setCookie("defid",CityID); }else { locid=getCookie("defid"); } var havecheck; if(getCookie("check")==''){ havecheck='2'; }else{ havecheck=getCookie("check"); } var show; if(havecheck=='0'){ locid=getCookie("CityID"); show=0; }else { locid=getCookie("defid"); show=1; } var urlstr = "http://jsp.116.com.cn/weather/"+locid+".js"; document.all["objscript"].src = urlstr; //var oWea = new makeWeatherObj(); </script> <script language="javascript"> var oWea = new makeWeatherObj(); </script> <div align="center"> <table width="180" height="52" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="middle"><table width="139" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="53" rowspan="2" align="center"><script language="javascript"> var weather24=oWea.swWeather24.split("-"); document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather24[0])+"_small.gif border='0' alt="个人站长制做网页常用的php代码_php技巧" >"); if(weather24.length==2) document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather24[1])+"_small.gif border='0' alt="个人站长制做网页常用的php代码_php技巧" >"); </script></td> <td width="86" align="center"><font color="#ff6600"> <script language="javascript"> document.write(oWea.swName); </script> </font></td> </tr> <tr> <td align="center"><script language="javascript"> var wendu=oWea.swWendu24.split("-"); document.write("<span class='f12blue2'>"+wendu[0]+""); </script></td> </tr> </table></td> </tr> </table> </div> </textarea><br><input onclick="runEx('runcode23365')" type="button" value="运行代码"> <input onclick="doCopy('runcode23365')" type="button" value="复制代码"> <input onclick="doSave(runcode23365)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div> <br>