|
发表于 2012-5-16 08:55:14
|
显示全部楼层
获取到的$source1是下面这么一大串东西,怎么能跟你的正则匹配呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>手机号码归属地查询 | 114la工具箱 </title><meta name="keywords" content=", 手机号码归属地查询,陌生手机号码查询" /><meta name="description" content=" , 准确判断陌生来电所在地区,手机号码所在地区查询,输入手机号即可知道用户所在的地区" /><link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="115 聚合搜索"/><script type="text/javascript">
var TOOL_URL = 'http://tool.114la.com';
var CATE_ID ='';
var MY_TOOLS_COOKIE = 'tools_my';
</script><link type="text/css" rel="stylesheet" href="http://tool.114la.com/static/css/global.css?v=20100531" /><script src="http://tool.114la.com/static/js/jquery.js" type="text/javascript"></script><script src="http://tool.114la.com/static/js/common.js?v=20100531" type="text/javascript"></script><link type="text/css" rel="stylesheet" href="http://tool.114la.com/static/tools/mobile/mobile.css" /><script type="text/javascript">
var MobileCheck = function(pNumber){
var result = Public.ValidateMoblie(pNumber.trim());
if(result == 1){
Sidebar_History.Set(pNumber);
return true;
}
else{
alert("请输入正确手机号");
return false;
}
}
var CopyResult = function(){
var top = document.getElementById("js_top_table").innerHTML;
var foot = document.getElementById("js_foot_table").innerHTML;
var r = top.replace(/<\/tr\s*\/?>/ig,'#').replace(/[\n|\s]*<[^>]*>/ig,'').replace(/#/ig,"\r\n");
r += foot.replace(/<\/tr\s*\/?>/ig,'#').replace(/[\n|\s]*<[^>]*>/ig,'').replace(/#/ig,"\r\n");
r=window.location+"\r\n以下内容由114啦工具箱提供:\r\n"+r;
Public.Copy(r);
}
var priceModel;
var numInput;
var oldText;
var cdmaReg = /^((133|153|180|189)\d{4,8})|(1349\d{7})$/;
var cnccReg = /^((13[5-9]|15[0|1|2|7|8|9]|18[2|7|8]|147)\d{4,8})|(134[0-8]\d{7})$/;
var showPrice = function(){
var v;
$("#js_pay_form input[name='parvalue']").each(function(){
if(this.checked){
v = this.value;
}
});
var obj;
var num =document.getElementById("mobile_num").value.trim();
if(cdmaReg.test(num)){
obj = priceModel["TEL3M"];
$("#c_30").attr("disabled",true);
if($("#c_30").attr("checked")){
$("#c_50").attr("checked",true);
showPrice();
return;
}
}
else if(cnccReg.test(num)){
obj = priceModel["KC3M"];
$("#c_30").attr("disabled",false);
}
else{
obj = priceModel["UNIMC10"];
$("#c_30").attr("disabled",false);
}
if(v != ""){
var vs = [];
for(var k in priceModel){
vs.push(Number(priceModel[k][v]));
}
if(vs.length > 0){
var min = vs[0];
var max = vs[0];
for(var i = 0, len = vs.length; i < len; i++){
if(min > vs[i]){
min = vs[i];
}
if(max < vs[i]){
max = vs[i];
}
}
if(min == max){
vs = [min];
}else{
vs = [min,max];
}
}
$("#js_price_showbox").html((obj?obj[v]:vs.join("-")));
}
else{
document.getElementById("c_30").checked = true;
showPrice();
}
}
var ajaxGetPrice = function(){
priceModel = {"mobile":{"30":30,"50":49.5,"100":99},"unicom":{"30":30,"50":49.5,"100":99},"telcom":{"50":49.5,"100":99}};
showPrice();
}
$(document).ready(function() {
new tab_content(
[
{TabId:"mobile_yd_btn",ContentId:"mobile_yd"},
{TabId:"mobile_dx_btn",ContentId:"mobile_dx"},
{TabId:"mobile_lt_btn",ContentId:"mobile_lt"}],"active"
);
$("#js_pay_form input[name='parvalue']").click(function(){
showPrice();
});
$("#mobile_num").bind("blur",function(){
var number=this.value.trim();
if(number==""){
return 0;
}
var result = Public.ValidateMoblie(number);
if(result == 1){
if(/^((133|153|180|189)\d{4,8})|(1349\d{7})$/.test(number)){
$("#c_30").attr("disabled",true);
}else{
$("#c_30").attr("disabled",false);
}
$.getJSON('/api/mobile.php?m='+number+'&t=json',
function(data){
$("#js_diqu").html("<span class='green'>"+data.location+" "+data.type+"</span>");
}
);
}else{
$("#js_diqu").html("<span class='light'>请输入正确的手机号</span>");
}
});
$("#js_pay_form").submit(function(){
var state = true;
var number=document.getElementById("mobile_num").value.trim();
if(number==""||Public.ValidateMoblie(number)!=1){
document.getElementById("mobile_num").select();
state = false;
}else{
if(/^((133|153|180|189)\d{4,8})|(1349\d{7})$/.test(number) && document.getElementById("c_30").checked){
state = false;
document.getElementById("c_30").checked=false;
document.getElementById("c_50").checked=true;
}
}
return state;
});
ajaxGetPrice();
});
</script></head><body>
<div id="header">
<a href="http://tool.114la.com" id="logo">114啦工具箱</a>
<div id="nav">
<b class="b b-l"></b>
<b class="b b-r"></b>
<ul>
<li><a href="http://tool.114la.com"><span>首页</span></a></li>
<li><a href="http://tool.114la.com/my"><span>我的工具箱</span></a></li>
<li id="nav_live"><a href="http://tool.114la.com/catalog_1_1.html" rel="live"><span>生活娱乐</span></a>
</li>
<li id="nav_site"><a href="http://tool.114la.com/catalog_3_1.html" rel="site"><span>站长工具</span></a>
</li>
<li id="nav_code"><a href="http://tool.114la.com/catalog_26_1.html" rel="code"><span>代码转换</span></a>
</li>
<li><a href="http://tool.114la.com/catalog.html"><span>所有工具</span></a></li>
</ul>
</div><h1 class="title">手机号码归属地查询</h1>
<div id="sub_header" class="clearfix">
<div class="menu" id="list_live">
</div>
<div class="menu" id="list_site">
</div>
<div class="menu" id="list_code">
</div>
<div id="main_bar">
<div id="local">
<a href='http://tool.114la.com/catalog'>114啦工具箱</a> »
<a href='http://tool.114la.com/catalog/1'>日常生活</a>
» <strong>手机号码归属地查询</strong>
</div>
<div id="js_handler_bar_list_box">
<span onclick="addBookmark('手机号码归属地查询|114la工具箱',window.location.href);" class="handle-fav" ><b class="tool-fav"></b> <i>收藏该工具</i></span>
<span onclick="Public.Copy(window.location.href+'\r\n手机号码归属地查询 --114la工具箱')" class="handle-com" ><b class="tool-share"></b> <i>推荐给好友</i></span>
<span id="js_handle_add" rel="1"><b class="tool-add"></b> <i>添加到“我的工具箱”</i></span>
<span class="hide" id="js_handle_dele" rel="1"><b class="tool-del"></b> <i>从“我的工具箱”移除</i></span>
</div>
</div>
</div>
</div><div id="main" class="clearfix">
<div class="col-main">
<form action="/index.php" class="form-search js_search_form" method="GET" rewrite='1' onsubmit="return MobileCheck(document.getElementById('search_input').value);" rewrite="1">
<input type="hidden" name="ct" value="live"/>
<input type="hidden" name="ac" value="mobile"/>
<input type="hidden" name="url" class="js_tool_url" value="http://tool.114la.com/shouji"/>
<label class="form-search-col" for="search_input">请输入手机号码:</label>
<div class="search_area">
<input id="search_input" type="text" name="k" value="1523768" class="text js_keyword_box" />
<br />
<span class="search-tips js_query_eg">如:号码前7位<a href="http://tool.114la.com/shouji/1380013" class="link">1380013</a> 或 <a href="http://tool.114la.com/shouji/13800138000" class="link">13800138000</a></span>
</div>
<input type="submit" class="search_submit" value="查询" />
<input type="hidden" class="js_no_result" value=""/>
</form>
<div id="info_box" class="box-base">
<div class="box-hd">
<h3 class="box-t-l">查询结果</h3>
<span class="box-t-link link" onclick="CopyResult();">复制结果</span>
</div>
<div id="result">
<img id="pic" src="http://tool.114la.com/static/images/1.gif" alt="" />
<table class="tb-result" id="js_top_table">
<tr>
<th>手机号段:</th>
<td>1523768</td>
</tr>
<tr>
<th>手机归属:</th>
<td>河南 信阳</td>
</tr>
<tr>
<th>卡类型:</th>
<td>中国移动152卡</td>
</tr>
<tr>
<th>区号:</th>
<td>0376</td>
</tr>
<tr>
<th>邮编:</th>
<td>464000 <a href="http://tool.114la.com/youbian/464000" target="_blank">查询相关地区邮编区号</a></td>
</tr>
</table>
</div>
</div><div id="know_box" class="box-base">
<div class="box-hd">
<h3 class="box-t-l">手机号码常识</h3>
</div>
<div id="know">
<p> <strong>如果您发现查询结果不详细或不正确,请使用<a href="http://tool.114la.com/index/add_mobile" target="_blank">手机号码归属地数据自助添加</a>功能进行修正</strong></p>
<p> 手机号码归属地查询,可查询中国移动、中国联通、中国电信手机号段归属地以及手机号码吉凶等信息。输入手机号码至少前 7 位,可查该手机号码的所属号段、归属地、卡类型、归属地地图和运营商标志;<br /><span class="light"> 输入完整的 11 位手机号码还可查手机号的吉凶信息。</span></p>
<p>
<strong>中国移动号段</strong>
<span>1340-1348</span>
<span>135</span>
<span>136</span>
<span>137</span>
<span>138</span>
<span>139</span>
<span>150</span>
<span>151</span>
<span>152</span>
<span>157</span>
<span>158</span>
<span>159</span>
<span>187</span>
<span>188</span>
<span>147</span>
<br>
<strong>中国联通号段 </strong> <span>130</span>
<span>131</span>
<span>132</span>
<span>155</span>
<span>156</span>
<span>185</span>
<span>186</span>
<span>145</span>
<br>
<strong>中国电信号段</strong> <span>133</span>
<span>1349</span>
<span>153</span>
<span>180</span>
<span>189</span>
</p>
</div>
</div><div id="tool_nav_box" class="box-base"><script>Public.Nav();</script></div></div><div class="col-sub">
<div id="chongzhi_box" class="box-base">
<div class="box-hd">
<h3 class="box-t-s">手机充值</h3>
<span class="box-t-link green">1分钟到账</span>
</div>
<form action="http://cz.115.com/" target="_blank" method="post" id="js_pay_form" class="box-bd">
<p>
<label for="mobile_num">手机号码:</label>
<input type="text" class="text" name="mobile" maxlength="11" autocomplete="off" id="mobile_num" />
</p>
<p>
号码归属:
<span class="imp" id="js_diqu"></span>
</p>
<p>
充值面值:
<input type="radio" name="parvalue" value="50" id="c_50" /><label for="c_50">50元</label>
<input type="radio" name="parvalue" value="100" id="c_100" checked="checked" /><label for="c_100">100元</label>
</p>
<p>
实际支付:
<strong id="js_price_showbox" class="light">-</strong> 元
</p>
<p class="bot">
<button type="submit">开始充值</button>
</p>
<input type="hidden" name="ac" value="topup_submit">
<input type="hidden" name="source" value="114la">
</form>
</div><script type="text/javascript">
var Sidebar_History = {};
Sidebar_History.Key = "live_mobile";
Sidebar_History.ClearHistory = function(pBoxId,pKey){
Public.History.Clear(pKey);
this.DisplayHistory(pBoxId,pKey);
}
Sidebar_History.Set = function(value){
Public.History.Set(Sidebar_History.Key,value);
Sidebar_History.DisplayHistory("js_history_box",Sidebar_History.Key);
}
Sidebar_History.DisplayHistory = function(pBoxId,pKey){
var box = document.getElementById(pBoxId);
var strCol = Public.History.Get(pKey);
var html = "";
if(strCol.length > 0){
for(var i = strCol.length - 1; i > -1; i--){
if(Sidebar_History.ClickHandler){
html += "<li><a href=\"javascript:\/\/\" onclick=\"Sidebar_History.ClickHandler($(this).attr('title'))\" title=\""+strCol[i]+"\">" + Public.String.Cut(strCol[i],25) + "</a></li>";
}
else{
html += "<li><a href=\"javascript:\/\/\">" + Public.String.Cut(strCol[i],25) + "</a></li>";
}
}
}
else{
html += "<li><span>暂无查询记录</span></li>";
}
box.innerHTML = "";
box.innerHTML = html;
}
$(document).ready(function(){
if(Sidebar_History.Key != ""){
Sidebar_History.DisplayHistory("js_history_box",Sidebar_History.Key);
$("#js_clear_history_box").bind("click",function(){
Sidebar_History.ClearHistory("js_history_box",Sidebar_History.Key);
});
}
});
</script>
<div id="my_record" class="box-base">
<div class="box-hd">
<h3 class="box-t-s">我的查询历史</h3>
<span class="ico-del" id="js_clear_history_box">删除记录</span>
</div>
<ul id="js_history_box">
</ul>
</div><div id="class_tool" class="box-base">
<div class="box-hd">
<h3 class="box-t-s">同类工具</h3>
</div>
<ul>
<li><a href="/tianqi/" target="_blank">天气预报</a></li>
<li><a href="/shouji/" target="_blank">手机号码归属地查询</a></li>
<li><a href="/live/speed/" target="_blank">网速测试</a></li>
<li><a href="/live/idcard/" target="_blank">身份证归属地查询</a></li>
<li><a href="/live/calendar/" target="_blank">万年历</a></li>
<li><a href="/live/car/" target="_blank">车辆违章查询</a></li>
</ul>
</div>
<div class="box-base" style="margin-bottom:10px;">
<script type="text/javascript">
alimama_pid="mm_26179720_2635634_9615222";
alimama_titlecolor="0000FF";
alimama_descolor ="000000";
alimama_bgcolor="FFFFFF";
alimama_bordercolor="E6E6E6";
alimama_linkcolor="008000";
alimama_bottomcolor="FFFFFF";
alimama_anglesize="0";
alimama_bgpic="0";
alimama_icon="0";
alimama_sizecode="35";
alimama_width=200;
alimama_height=200;
alimama_type=2;
</script>
<script src="http://a.alimama.cn/inf.js" type="text/javascript"></script>
</div>
<div id="feedback_2">
<a href="http://www.114la.com/feedback/" target="_blank"><span class="ico-feed"></span>意见反馈</a>
</div> </div></div><div id="footer">
<p>
<a href="http://hr.ylmf.com/" target="_blank">加入雨林木风</a> -
<a href="http://www.114la.com/feedback/">意见反馈</a> -
<a href="http://tool.114la.com/sitemap.html">网站地图</a> -
<a href="http://tool.114la.com/index/work">合作伙伴</a>
</p>
<p>Copyright © 2009-<script type="text/javascript">document.write(new Date().getFullYear());</script> 115.com All Rights Reserved </p>
</div><script type="text/javascript" src="http://tool.114la.com/dynamic/hits.php?tool=live::mobile&t=1337129533"></script>
<script type="text/javascript" src="http://tool.114la.com/static/js/global.js"></script>
</body>
</html> |
|