找回密码
 加入
搜索
查看: 9863|回复: 19

[AU3基础] 求一个正则的写法

 火.. [复制链接]
发表于 2011-5-20 18:09:33 | 显示全部楼层 |阅读模式
<div class="title1" style="line-height:normal;"><strong style="line-height:normal;">ミ旋转36oぅ</strong>
我想用正则从上面的字符串中提取出ミ旋转36oぅ这段,正则怎么个写法呢?先谢谢了
发表于 2011-5-20 21:28:28 | 显示全部楼层
stringregexpreplace($str,'<[^>]*>','')

评分

参与人数 1金钱 +20 贡献 +3 收起 理由
xiaozui + 20 + 3 非常感谢你的热心帮助^_^

查看全部评分

发表于 2011-5-21 16:12:31 | 显示全部楼层
回复 2# 3mile

请教下3英里童鞋,可以这样写吗?

StringRegExpReplace($str,'.*">|</.*','')

试了下也可以提取出来,不过不像你那样简练,看了不少正则的文档,一直不得要领
发表于 2011-5-21 18:09:42 | 显示全部楼层
刚学正则最好先只用 StringRegExp, 先学好匹配
StringRegExpReplace 的用法和匹配在思路上会有些不同.

评分

参与人数 1金钱 +10 贡献 +2 收起 理由
xiaozui + 10 + 2 嗯,多谢兄弟指点!

查看全部评分

发表于 2011-5-21 20:55:59 | 显示全部楼层
本帖最后由 3mile 于 2011-5-21 21:18 编辑
回复  3mile

请教下3英里童鞋,可以这样写吗?

StringRegExpReplace($str,'.*">|
annybaby 发表于 2011-5-21 16:12

童鞋是什么?同学吗?
发表于 2011-5-21 21:22:37 | 显示全部楼层
本帖最后由 love5173 于 2011-5-21 21:26 编辑

回复 1# xiaozui

    $str=StringRegExpReplace($str,'<.*?>','')
$str=StringRegExpReplace($str,'.*>([^<]+).*','\1')
单纯针对你上面那串字符的话匹配起来太随心所欲了,我想你这句应该是从更大的文本里出来的吧!直接处理那个大的才是正则的强项

评分

参与人数 1金钱 +12 贡献 +5 收起 理由
xiaozui + 12 + 5 谢谢你的热心帮助,我受益匪浅哦

查看全部评分

发表于 2011-5-21 21:22:52 | 显示全部楼层
本帖最后由 annybaby 于 2011-5-21 21:52 编辑

回复 5# 3mile

童鞋就是同学啦,由于相当数量的网友使用的是拼音输入法,但拼音输入法的一个显著缺点就是比五笔的重码率高得多(特别是前期还不够智能的时候)经常有人会因为普通话不准确,非正式交流以及模糊音兼容设置等,出现很多近似的"代替词",如"童鞋"代替"同学","酱紫"代替"这样子","筒子"代替"同志","偶"代替"我","表"代替"不要(或者'别')","木有"代替"没有"等等,后来大家发觉,在一些非正式的环境(特别是聊天和论坛)交流中,这种不拘一格的做法不但不会影响到信息的传递,反而会多了一丝幽默感,于是风气就传开了~~

以上纯属乱弹,呵呵~~
发表于 2011-5-21 21:29:00 | 显示全部楼层
回复  3mile

童鞋就是同学啦,由于相当数量的网友使用的是拼音输入法,但拼音输入法的一个显著缺点就是比 ...
annybaby 发表于 2011-5-21 21:22

酱紫啊?
annybaby筒子或是童鞋,偶木有别的意思,表解释了
 楼主| 发表于 2011-5-21 21:29:20 | 显示全部楼层
本帖最后由 xiaozui 于 2011-5-21 21:35 编辑
stringregexpreplace($str,']*>','')
3mile 发表于 2011-5-20 21:28



谢谢!其实,我是想获取网页源码中的一个字符串,可是我对正则十分感冒,对于你给出的表达式,我不会运用,555....下面是网页源码,我想提取的字符串644行中的“丹丹儿”,麻烦兄弟帮我看看怎么写正则,
<script type="text/javascript">document.domain='51.com';window['UD']={"user":{"user":"dandanainilove","_user":"dandanainilove","nickname":"\u4e39\u4e39\u513f","face":"http:\/\/p0.u.51img1.com\/0f\/d2\/dandanainilove_50.gif?v=20100128125452","sex":"\u5973\u58eb","vip":"0","viplink":"","vippic":"http:\/\/static.51img1.com\/i\/kf\/viplevel\/vip_out.gif?0401","isconfirm":"1","levelinfo":{"level":"7299","name":"\u7ea2\u8272\u8760\u738b57\u7ea7","pic":"d057.gif"},"ishome5":"0","htemp1":"0","uid":"3409855"},"guest":{"user":"simayizhuo","_user":"simayizhuo","nickname":"\u9189\u671b\u79cb\u6708","face":"http:\/\/pe.u.51img1.com\/e1\/b2\/simayizhuo_50.gif?v=20080414183159","sex":"\u5148\u751f","vip":"0","viplink":"","vippic":"http:\/\/static.51img1.com\/i\/kf\/viplevel\/vip_out.gif?0401","isconfirm":"1","levelinfo":{"level":"7999","name":"\u7ea2\u8272\u8760\u738b59\u7ea7","pic":"d059.gif"},"ishome5":"0","htemp1":"0","uid":"56938257"},"avatar":{"passport":"dandanainilove","groupid":"51","clubid":"51","male":"0","width":"175","height":"245","avatarver":"1196423042","avatardis":"0","studiover":""},"common":{"sextxt":"\u5979","isfriend":"-1","friendtype":{"rela":"-1","friendtype2":"-1"},"state":["7209","100","5374","444"],"title":"\u6d45\u6d45\u7684\u56de\u5fc6\uff0c\u6162\u6162\u7684\u5fd8\u8bb0","memotext":"__\u6bcf\u4e2a\u57ce\u5e02\u90fd\u4f1a\u4e0b\u96e8\uff0c\u2014\u2014\u201d\u5c31\u50cf\u6211\uff0c+\u65e0\u8bba\u8d70\u5230\u54ea\u91cc\uff0c.\u2014\u2014\u90fd\u4f1a\uff0c\uff0cQ\u2014\u2014\u60f3\u8d77\u4f60..","time":"1305982819","key":"3b22eb23c4926a656b2c14bc79e31938","flash_allow":"3","flash_visituse":"3","pagename":"loveinfo,index","isopen":"0","iseditplus":"0","expand_friend":"0","expand_brand":"0","expand_reg":"0","love":"0","shareuser":"","_shareuser":"","shareid":"0","actspace":"","isskin":"0","light":"","topstar":"0","pet":[],"supergirl":[],"ist":"0","ch":"1601497371","olurl":"http:\/\/my.51.com\/citylucker\/online_list_user.php?city=&prov=%B9%E3%B6%AB&town=%B9%E3%D6%DD","udesc":"\u5e7f\u4e1c\uff0c\u5e7f\u5dde","hasnick":"1","styletype":"10060006","nav":[],"visit_user_up":"0","ad":[],"honor":"","newtpl":"0","v":"0","visitusermyisnew":"1"},"comments":{"type":"loveinfo","id":"0","itemid":"","total":"0"}};</script>

<style type="text/css">
html{overflow-x:hidden;}
.noselect{-moz-user-select:none;-khtml-user-select:none;user-select:none;}
#all,#top_box,#page_box{width:760px;}
#page_box_left{width:200px;margin-left:0px;margin-right:0px;}
#page_box_center{width:550px;margin-left:10px;*margin-left:10px;_margin-left:5px;margin-right:0px;}
#page_box_right{display:none;}
.pop_laba{width:400px; color:#000; font-size:12px;}
.pop_laba .head{height:28px; overflow:hidden;position:relative;}
.pop_laba .head .d1{background:url('http://static.51img1.com/v3/home/images/laba_pic1.gif') no-repeat; width:259px;}
.pop_laba .head .d2{background:url('http://static.51img1.com/v3/home/images/laba_pic1.gif') no-repeat 0 -37px;}
.pop_laba .head .d3{background:url('http://static.51img1.com/v3/home/images/laba_pic1.gif') no-repeat right -72px; width:38px;}
.pop_laba .head .close{display:block; position:absolute; right:5px; top:6px; width:15px; height:13px; text-decoration:none;}
.pop_laba img{border:0;}
.pop_laba a{color:#0066cc;}
.pop_laba .main{background:#4878c6; border:1px solid #599fff; padding:3px; border-top:0;}
.pop_laba .con{border:1px solid #b9d4f9;background:#fff;}
.pop_laba .bottom{padding:5px 0 3px; text-align:right; color:#fff; font-weight:bold;}
.pop_laba .bottom span{margin:0 5px;}
.pop_laba .bottom img{vertical-align:middle; };
.login_block{margin:0;border:1px solid #ddd;padding:10px;width:295px;font-size:13px;}
.login_block ol{padding:10px 0 0 0;}
.login_block .gbook_login_submit{padding:5px 0 0 98px;font-size:12px;}
.login_block .checkbox{margin:0 1px 0 7px;vertical-align:text-bottom;}
.login_block .gbook_login_register{margin-top:10px;padding-top:7px;border:0;border-top-style:dashed;border-top-width:1px;}
.login_block input.short{width:130px;font-family:Arial;}
</style>
<script type="text/javascript">
document.domain='51.com';
window._arrowhead_='▼';
var act_yzcs_FlashReady=false;
//window.onerror=function(){return true;}
</script>
function clearPageLoding() {
$("#page_loding_div , #page_loding_flash_div , #page_loding_rebroadcast").hide();
$("#all,#toolbar,#copyright").show();
}
</script>

<script language="javascript" type="text/javascript">
$(document).ready(function(){
});
</script>

<title> 浅浅的回忆,慢慢的忘记 </title>


</head>

<body>
<div id="toolbar" style="height:25px;background-position:bottom;">
<div id="toolbar_left" style="width:32%">  
<span><a href="http://www.51.com/" target="_blank"><img class="toblog" src="http://static.51img1.com/v3/home/images/tms.gif" summary="{u:'http://static.51img1.com/v3/home/images/51com.jpg',w:64,h:23}" width="0" border="0" /></a></span>
<span id="top_music_but" style="display:none;"><a href="javascript:void(0);" onclick="closeBgMusic();" id="top_music_text">关闭此页面音乐</a></span><img style="display:none;" id="top_music_img" src="http://static.51img1.com/v3/home/images/tms.gif" summary="{u:'http://static.51img1.com/i/home/music_open.gif',w:19,h:16}" width="0" border="0" />
</div>
<div id="toolbar_right"><a id="changetplid" href="http://home.51.com/?c=act&a=prevpage&u=simayizhuo&_sid=topchangetpl" target="_blank">换模板</a> | <img src="http://static.51img1.com/v3/home/images/tms.gif" summary="{u:'http://static.51img1.com/v3/home/images/lt.gif',w:21,h:20}" class="tobvip" width="0" border="0" /> <a href="http://ilive.51.com/RandomUser/RandomUser.php?user=&sex=" target="_blank">乱弹</a> | 
<a href="http://passport.51.com/reg.5p" target="_blank">注册</a> | 
<a href="http://my.51.com/" target="_blank">登录</a>  
</div>
</div><div id="all" class="all">
<div id="top" class="p_top">
<div id="top_box" class="top_box">
<div id="header_box" class="header_box" style="text-align:center;">
<div style="width:95%;height:100%;">
<div id="header_box_title">浅浅的回忆,慢慢的忘记 http://dandanainilove.51.com</div>
<div id="header_box_sign">__每个城市都会下雨,——”就像我,+无论走到哪里,.——都会,,Q——想起你..</div>
</div>
</div>
<div id="menu_box" class="menu_box"><a name="mn"></a>
<ul>
<li id="menu_index"><a id="home_link" href="/dandanainilove">首页</a>
<li id="menu_loveinfo"><a href="/dandanainilove/loveinfo">个人资料</a>
<li id="menu_diary"><a href="/dandanainilove/diary">日记</a>
<li id="menu_photo"><a href="/dandanainilove/photo">相册</a>
<li id="menu_music"><a href="/dandanainilove/music">音乐</a>
<li id="menu_friend"><a href="/dandanainilove/friend">好友</a>
<li id="menu_gbook"><a href="/dandanainilove/gbook">留言板</a>
</ul>
</div>
</div> </div>
<div class="box" id="page_box">

<style>
.small_page_bar{line-height:13px;}
.small_page_bar .pagination{float:left;}
.small_page_bar .pagination a,.small_page_bar .pagination span{margin:0;padding:2px 0.25em 0;}
.small_page_bar .pagination a{text-decoration:none;}
.small_page_bar .pagination_txt{float:left;margin-right:2px;padding:2px 0 0;}
</style>
<script>
var defaultreplyinput_click = 0;
var pnode;
var upinputs=null;
function defaultreplyinput_val(type, id)
{
return '<div class="defaultreplyinput"><input style="line-height:normal;" type="text" class="reply_fake" value="添加评论" onfocus="defaultreplyinputfn(this,\''+type+'\',\''+id+'\')" /></div>';
}
function defaultreplyinputfn(obj,type,id)
{
window.UD.comments.type = type;
window.UD.comments.id = id;
if(defaultreplyinput_click == 1 && upinputs!=null)
{
//原来打开的hidden
$(upinputs).show();
}

pnode = obj.parentNode;
$(obj).hide();
upinputs=obj;
$(pnode).append($('#commend_box'));
$("#comment_info_memo").val('').focus();

defaultreplyinput_click = 1;
}

function loveinfo_get_photo_comment(_user, type, id, currpage)
{
if(!currpage || currpage <= 0)
{
currpage = 1;
}
var splitpage = '';
$.get('/?c=mc&a=listcomment&u='+_user+'&id='+id+'&type='+type+'&size=5&home5=1&page='+currpage,{},function(rd){
var str = rd.split("\n\t\n");
if(str.length == 2)
{
var ps=str[0].split(",");
splitpage = loveinfo_split_page(ps[0], ps[1], ps[2], _user, type, id, ps[2]);
$("#new_comment_"+type+"_"+id).html(str[1]+splitpage);
}
});
}

function loveinfo_split_page(total, pages, page, _user, type, id, currpage)
{
total = parseInt(total);
pages = parseInt(pages);
page = parseInt(page);
currpage = parseInt(currpage);

if(total <= 0 || pages <= 1)
{
return '';
}
if(!currpage || currpage <= 0)
{
currpage = 1;
}

var pdesc = '<div class="page_bar small_page_bar"><div class="pagination_txt">共有'+total+'条评论</div><div class="pagination">';
if(pages <= 10)
{
for(var i = 1; i <= pages; i++)
{
if(page == i)
{
pdesc += '<span class="current">'+i+'</span>';
}
else
{
pdesc += '<a href="javascript:void(0);" onclick="loveinfo_get_photo_comment(\''+_user+'\', \''+type+'\', \''+id+'\', \''+i+'\');return false;">'+i+'</a> ';
}
}
}
else
{
var start = 0;
var end = 0;
if(page - 3 <= 0)
{
start = 2;
start = start >= 2 ? start : 2;
end = page + 3 + (3 - page);
end = end >= pages ? pages - 1 : end;
}
else
{
start = page - 3;
start = start >= 2 ? start : 2;
end = page + 3;
end = end >= pages ? pages - 1 : end;
}
pdesc += '<a href="javascript:void(0);" onclick="loveinfo_get_photo_comment(\''+_user+'\', \''+type+'\', \''+id+'\', \'1\');return false;">1</a> ';
if(start >= 3)
{
pdesc += '<span>...</span>';
}
for(var i = start; i <= end; i++)
{
if(page == i)
{
pdesc += '<span class="current">'+i+'</span>';
}
else
{
pdesc += '<a href="javascript:void(0);" onclick="loveinfo_get_photo_comment(\''+_user+'\', \''+type+'\', \''+id+'\', \''+i+'\');return false;">'+i+'</a> ';
}
}
if(end <= pages - 2)
{
pdesc += '<span>...</span>';
}
pdesc += '<a href="javascript:void(0);" onclick="loveinfo_get_photo_comment(\''+_user+'\', \''+type+'\', \''+id+'\', \''+pages+'\');return false;">'+pages+'</a> ';
}
pdesc += '</div></div>';

return pdesc;
}
</script>
<script type="text/javascript">
//Jquery的POST跨域扩展
(function($){
window.isIE6=jQuery.browser.version==6.0;
jQuery.extend({
ajaxFormNums:0,
ajaxFormPost:function(sURL, datas, callBack,domains){/*[sURL=提交地址, datas=要提交的数据对像, callBack=回调,domain=域]*/
domains=domains||'51.com';
var on='TEMP_POST_'+$.ajaxFormNums;
var of=[];
of.push('<div id="'+on+'_DIV" style="position:absolute;z-index:10;top:-20000100px;"><iframe id="'+on+'_IFRAME" name="'+on+'_IFRAME" height="1" width="1" src="http://friend.51.com/ajax_blank.php?d='+encodeURIComponent(domains)+'" frameborder="0" border="0" scrolling="no"></iframe><form id="'+on+'_FORM" name="'+on+'_FORM" method="post" action="'+sURL+'" target="'+on+'_IFRAME">');
$.each(datas,function(i,n){of.push('<textarea name="'+i+'" style="width:1px;height:1px;">'+n+'</textarea>');});
of.push('<input type="submit" value="Submit" name="b1" style="width:1px;height:1px;" /></form></div>');
$(document.body).append(of.join(''))//.insertAdjacentHTML("beforeEnd", of.join(''));
//document.body.insertAdjacentHTML("beforeEnd", of.join(''));
of=null;
$('#'+on+'_IFRAME').bind('load',function(){
if(!$(this).attr('summary'))
{
$(this).attr('summary',1);
$('#'+on+'_FORM').submit();
return false;
}

if(isIE6)
{
if($.isFunction(callBack))
{
callBack(window.name);
}
else
{
eval(callBack+'(window.name)');
}
}
else
{
var oIf= this.id;
if($.isFunction(callBack))
{
callBack(frames[oIf].document.body.innerHTML);
}
else
{
eval(callBack+'(frames[oIf].document.body.innerHTML)');
}
}
window.setTimeout(function(){
$('#'+on+'_DIV').remove();
},1);
});
$.ajaxFormNums++;
}
});
})(jQuery);

//交友倾向显示
function editTrend(flg) {
var dynamic = selectTrend(0);
var flg = flg ? flg : 0;
if (flg == 1) {
var offset = $('#common_ico_edit_tips').offset();
} else {
var offset = $('#ico_edit_tips').offset();
}
var left = offset.left;
var top = offset.top;
var html = '<div id="new_guide_pop" class="new_guide_pop pop_wish" style="top:'+top+'px;left:'+left+'px;z-index:88889;">';
html += '<div class="hl_tip">';
html += '<a class="ico_edit">[编辑]</a>';
html += '</div>';
html += '<div class="g_prompt">';
html += '<span class="arrow"></span>';
html += '<div class="g_prompt_box">';
html += '<a href="javascript:closeTrend()" class="close">关闭</a>';
html += '<div class="t"></div>';
html += '<div class="m">';
html += '<div class="qm">';
html += '<div id="dynamic_tips" class="box do_what">';
html += dynamic;
html += '</div>';
html += '<div class="box">';
html += '<h3>年龄</h3>';
html += '<div class="contain">';
html += '<select id="trend_age_min"></select> — <select id="trend_age_max"></select> 岁';
html += '</div>';
html += '</div>';
html += '<div class="btn_area"><span class="g_btn_w"><input type="button" onclick="saveTrend('+flg+')" value="保存设置" class="g_btn" /></span></div>';
html += '</div>';
html += '</div>';
html += '<div class="b"></div>';
html += '</div>';
html += '</div>';
html += '</div>';
$('.g_layer_mask').css({opacity:0.5,'background-color':'#000000'});
$_Global_Mask.show();
$(document.body).append(html);
//抓取交友目的数据
$.getJSON('http://my.51.com/port/ajax/main.trend.php?callback=?', {'action':'getTrend'} , function(data){
$("#who_input_text").val(data.target);
selected_target = data.target;
$("#trend").val(data.trend);
if(data.trend != '')
{
age_select($('#trend_age_min')[0], 0, 100, data.age_min);
age_select($('#trend_age_max')[0], 0, 100, data.age_max);
}else{
age_select($('#trend_age_min')[0], 0, 100, 0);
age_select($('#trend_age_max')[0], 0, 100, 30);
}
});
$('#new_guide_pop').show();

}

function selectTrend(start) {
var girlTrend = new Array('一起看电影', '一起喝咖啡', '当我的泄气桶', '一起去看演唱会', '一起K歌', '去吃大餐', '请我吃哈根达斯', '冬天当我的热水袋', '当我保镖', '吃完我做的菜', '一起做饭', '一起去旅游', '去江边吹风', '加我为好友', '教我打网球', '教我打台球', '接我下班', '帮我搬家', '去郊外呼吸新鲜空气', '每天一起跑步', '去看海', '温暖拥抱', '每天给我买早餐', '一起开心的淋雨', '一起环球旅行', '帮我修理电器', '陪我坐过山车', '帮我拧瓶盖', '当我弟弟', '陪我聊聊天说说话', '一起做义工', '陪我去看午夜场电影', '每天给我一个晚安吻', '在我不开心的时候抱抱我', '让我吃饱了才有力气减肥', '在拥挤地铁把我护在怀里', '做我老公', '喜欢我疼我爱我');
var boyTrend = new Array('开车去兜风', '一起K歌', '看电影', '一起晚餐', '去看海', '一起做饭', '喝咖啡', '去江边吹风', '加我为好友', '一起打网球', '一起打台球', '一起打高尔夫', '去郊外呼吸新鲜空气', '每天一起跑步', '温暖拥抱', '去吃早餐', '一起做义工', '一起偷菜', '一起数星星', '一起去看流星雨', '陪我聊聊天说说话', '做我的好妹妹', '结婚!', '做我老婆', '好好谈一次恋爱', '好好过一辈子', '探讨爱情');
var sex = "1";
var select_sex = (sex == 1) ? 2 : 1;
var start = start ? parseInt(start) : 0;
var end = parseInt(start) + parseInt(5);

//根据当前用户性别生成li
var who_selects = "朋友、同城网友、一个知己、护士、可爱的小女生、狮子座的女生、爱笑的女生、驴友、老乡、女生、好哥们、有爱心的女生、创业伙伴、有思想的人、信佛的朋友";
var select_arr = who_selects.split('、');
var select_len = select_arr.length;
var select_li_html = '';
for(var i=0;i<select_len;i++)
{
if(i == select_len-1)
{
select_li_html += '<li class="no_border"><a href="javascript:void(0)">'+ select_arr[i] +'</a></li>';
}else{
select_li_html += '<li><a href="javascript:void(0)">'+ select_arr[i] +'</a></li>';
}
}
var html = '';
html += '<h3>我想认识</h3>';
html += '<div class="who" id="who_select_main">\
<div class="who_select"><input id="who_input_text" type="text" class="input_text" value="'+ selected_target +'" onclick="who_input_click()"><a class="arrow" id="who_select_a" href="javascript:void(0)" onclick="who_select_click();" onmouseover="who_select_over();">点击打开</a></div>\
<div class="who_contain">';
html += '<ul id="who_select_ul" class="clear">'+ select_li_html +'</ul>';
html += '</div>\
</div>';
html += '<input type="text" id="trend" name="trend" value="" maxlength="12" class="input_text" onkeyup="check_trend(this.value);" />';
html += '<ul class="do_list">';
if (select_sex == 1) {
var trend = girlTrend;
} else {
var trend = boyTrend;
}
var length = trend.length;
if (start < 0 || start >= length) {
start = 0;
end = parseInt(start) + parseInt(5);
}
if (end > length) {
end = length;
}
for (i=start; i<end; i++) {
html += '<li><a href="javascript:void(null);" onclick="hitTrend(\''+ trend[i] +'\')">'+ trend[i] +'</a></li>';
}
html += '</ul>';
html += '<p class="more"><a href="javascript:moreTrend('+end+')" class="ico_loaders">更多选项</a></p>';
return html;
}

/*交友目的框事件*/
var is_on_select = true; //设置标志位,当鼠标在选项框上时为true
var selected_target = ''; //保存已选择或者填写的交友对象,防止刷新下面的交友目的被清空了
function who_select_over()
{
is_on_select = true;
$("#who_select_main").attr('class','who who_hover');
$("#who_select_main a").mouseout(function(){
$("#who_select_main").attr('class','who');
is_on_select = false;
});
}
function who_select_click()
{
if($("#who_select_ul").parent().css('display') == 'none')
{
$("#who_select_ul").parent().show();
//判断CLICK事件发生时,鼠标是否在select框和a标签上
$("#who_select_ul,#who_select_a").hover(
function(){
is_on_select = true;
},
function(){
is_on_select = false;
}
);
}else{
$("#who_select_ul").parent().hide();
}
$("#who_select_ul li").click(function(){
$("#who_input_text").val($(this).text());
selected_target = $(this).text();
$("#who_select_ul").parent().hide(); 
});
//元素外点击事件
$(".g_prompt_box").click(function(){
if(is_on_select == false)
$("#who_select_ul").parent().hide();
});
}
function who_input_click()
{
$("#who_select_ul").parent().hide();
$("#who_input_text").keyup(function(){
// 过滤违禁输入:QQ号,手机号,5位以上不连续数字,当用户发布的消息中,包含上述表现形式时弹出alert
var who_hover_val = str_slice_12($("#who_input_text").val());
if(who_input_check_counts(who_hover_val) >= 5)
{
var msg = '不要随便泄露自己的手机号或qq号哦!'
Alert({title:"提示" , msg:msg, showMask:true, fuckflash:true});
$("#who_input_text").val('');
selected_target = '';
}else{
$("#who_input_text").val(who_hover_val);
selected_target = who_hover_val;
}
});
}
//字符截取12字符
function str_slice_12(str)
{
var slice_end = 0;
var s_count = 0;
var len = str_len(str);
for(var i=0;i<len;i++)
{
if(s_count == 12)
{
return str.substring(0 , i);
break;
}else if(s_count == 13)
{
return str.substring(0 , i-1);
break;
}
if(str.charCodeAt(i)<255) //非汉字
{
s_count++;
}else{
s_count += 2;
}
}
return str.substring(0 , i);
}
//检测违禁输入
function who_input_check_counts(str)
{
var appear = 0;
var check_words = '一二三四五六七八九十1234567890壹贰叁肆伍陆柒捌玖零㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩①②③④⑤⑥⑦⑧⑨⑩⑴⑵⑶⑷⑸⑹⑺⑻⑼⒈⒉⒊⒋⒌⒍⒎⒏⒐';
var str_arr = str.split('');
for(var i in str_arr)
{
if(check_words.indexOf(str_arr[i]) != -1)
appear++;
}
return appear;
}
//检测交友倾向的输入
function check_trend(trend)
{
if(who_input_check_counts(trend) >= 5)
{
var msg = '不要随便泄露自己的手机号或qq号哦!'
Alert({title:"提示" , msg:msg, showMask:true, fuckflash:true});
$("#trend").val('');
return;
}
}
/*交友目的框事件结束*/

//交友倾向-更多注意
function moreTrend(seq) {
var seq = seq ? parseInt(seq) : 0;
var dynamic = selectTrend(seq);
var trend = $('#trend').val();
if ($('#dynamic_tips')) {
$('#dynamic_tips').html(dynamic);
}
$('#trend').val(trend);
}

//交友倾向-关闭
function closeTrend(seq) {
$('#new_guide_pop').remove();
$_Global_Mask.hide();
}

//交友倾向-选择
function hitTrend(str) {
$('#trend').val(str);
}

//交友倾向-保存
function saveTrend(flg) {
var target = $.trim($('#who_input_text').val());
var trend = $.trim($('#trend').val());
var age_min = $('#trend_age_min').val();
var age_max = $('#trend_age_max').val();
var sex = "1";
var select_sex = (sex == 1) ? 2 : 1;

//过来script脚本
trend = trend.replace(/<script.*?>.*?<\/script>/ig, ''); 
target = target.replace(/<script.*?>.*?<\/script>/ig, ''); 
if (target == '') {
var msg = '交友对象不能为空'
Alert({title:"交友对象" , msg:msg, showMask:true, fuckflash:true});
return;
}
if (target.length > 16) {
var msg = '交友对象字数不能超过16长度'
Alert({title:"交友对象" , msg:msg, showMask:true, fuckflash:true});
return;
}
if(who_input_check_counts(target) >= 5)
{
var msg = '不要随便泄露自己的手机号或qq号哦!'
Alert({title:"提示" , msg:msg, showMask:true, fuckflash:true});
$("#who_input_text").val('');
selected_target = '';
return;
}
if (trend == '') {
//alert('快告诉我们你想和'+(select_sex==2 ? '女' : '男')+'生一起干什么吧。');
var msg = '快告诉我们,你想和'+ target +'一起干什么吧。'
Alert({title:"交友倾向" , msg:msg, showMask:true, fuckflash:true});
return;
}
if (trend.length > 12) {
var msg = '交友倾向字数不能超过12长度'
Alert({title:"交友倾向" , msg:msg, showMask:true, fuckflash:true});
return;
}
if(who_input_check_counts(trend) >= 5)
{
var msg = '不要随便泄露自己的手机号或qq号哦!'
Alert({title:"提示" , msg:msg, showMask:true, fuckflash:true});
$("#trend").val('');
return;
}

$.ajaxFormPost('http://my.51.com/port/ajax/main.trend.php', {trend:trend, age_min:age_min, age_max:age_max , target:target , 'charset':'gbk'} , function(back){
if(back == -1)
{
$('#trend').val('');
var msg = '尊敬的用户,您好!你所发布的信息中含有敏感违规信息,系统已为你清空,请重新输入!';
Alert({title:"提示" , msg:msg, showMask:true, fuckflash:true});
return;
}else if(back == -2){
$('#who_input_text').val('');
var msg = '尊敬的用户,您好!你所发布的信息中含有敏感违规信息,系统已为你清空,请重新输入!';
Alert({title:"提示" , msg:msg, showMask:true, fuckflash:true});
return;
}else{
var str = '我想认识'+age_min+'-'+age_max+'岁的'+ target +','+trend;
if (flg == 1) {
if ($('#common_fav_trend_tips')) {
$('#common_fav_trend_tips').html(str);
}
} else {
if ($('#fav_trend_tips')) {
$('#fav_trend_tips').html(str);
}
}
$('#new_guide_pop').remove();
$_Global_Mask.hide();
} 
});
}

//用户年龄选择
function age_select(obj, min, max, value) {
//alert(min+'|'+max+'|'+value);
var min = min ? parseInt(min, 10) : 0;
var max = max ? parseInt(max, 10) : 100;
if (min < max) {
for(i = obj.options.length -1; i >= 0 ; i--) {
if(typeof obj.options.remove == "undefined") {
obj.remove(i);
} else {
obj.options.remove(i);
}
}
var k = 0;
for (var i=min; i<=max; i++) {
obj.options.add(new Option(i, i));
if(obj.options[k].text == value) {
obj.options[k].selected = true;
}
k++;
}
}
}
//计算长度
function str_len(fData) {
var intLength=0;
for (var i=0;i<fData.length;i++) {
if ((fData.charCodeAt(i) < 0) || (fData.charCodeAt(i) > 255))
intLength=intLength+2;
else
intLength=intLength+1;
}
return intLength;
}
</script>
<div class="p_note_main clearall">
<div class="p_personal_main clearall">
<div class="p_personal_main_box clearall" id="p_personal_main_id" >
<div class="personal_left">
<div class="avatar" style="z-index:5001;">
<img src="http://static.51img1.com/v3/home/loveinfo/images/online.gif" class="online"/> <div class="img_box img_130" id="userinfo_face_div_id"><a href="http://home.51.com/dandanainilove/photo"><img src="http://p0.u.51img1.com/0f/d2/dandanainilove_130.gif?v=20100128125452" /></a></div>
<div class="ico_videosure">
<a href="javascript:void(0);" onclick="rz_photo('dandanainilove',1);return false;"><img title="已认证" src="http://static.51img1.com/v3/themes/skins/images/ico_videosure.gif"/></a> </div>
</div>
<ul class="clearall">
<li><a id="userinfo_hello" href="javascript:void(0);" class="button_add" onclick="home_statistic(95);jiahaoyou(3409855 , 'home');return false;"><i class="ico_jy">打 招 呼</i></a></li> <li><a href="http://jiaoyou.51.com/?c=gift&uid=3409855" onclick="home_statistic(97);" target="_blank" class="home_button"><span class="ico_gift">送她礼物</span></a></li><li><a href="javascript:void(0);" class="home_button home_button_gray" onclick="home_statistic(98);jiaoyou.writemail('3409855');return false;"><span class="ico_letter">给她写信</span></a></li><li><a href="javascript:void(0);" class="home_button home_button_gray" onclick="home_statistic(99);open_dialog('simayizhuo','dandanainilove',event);return false;"><span class="ico_chat">跟她聊天</span></a></li>
</ul>
</div>
<div class="personal_main" id="personal_main_id">
<div class="personal_inner">
<div class="box_wrap top_info2" style="margin-top:0;">
<p class="box_wrap_top"><span class="v_width"></span></p>
<div class="contain">
<div class="title1" style="line-height:normal;"><strong style="line-height:normal;">丹丹儿</strong>(dandanainilove)
<a target="_blank" href="http://kf.51.com/help/dengji.php"><img border="0" title="红色蝠王57级" src="http://static.51img1.com/i/uc/level/d057.gif"/></a>
</div>

<table class="personal_info_list clearall">
<tr class="bg">
<td>
<em>性别:</em>女士 </td>
<td class="td2">
<em>星座:</em>双鱼座 </td>
</tr>
<tr >
<td>
<em>年收入:</em>保密 </td>
<td class="td2">
<em>体形:</em>匀称 </td>
</tr>
<tr class="bg">
<td>
<em>所在地区:</em>广东,广州,萝岗区 </td>
<td class="td2">
  </td>
</tr>
<tr >
<td colspan="2"><em>家乡:</em>湖北,宜昌,长阳</td>
</tr>
<tr class="bg">
<td colspan="2"><em>职业:</em>工作</td>
</tr>
<tr >
<td colspan="2"><em>交友目的:</em>友情</td>
</tr>
<tr class="bg">
<td colspan="2"><em>有无恋爱史:</em>保密</td>
</tr>
<tr >
<td colspan="2"><em>兴趣爱好:</em>k歌、购物</td>
</tr>
<tr class="bg">
<td colspan="2"><em>近期的心愿:</em>工作上顺心</td>
</tr>
</table>

<table class="personal_info_list clearall" id="personal_loveinfo_more" style="display:none;">
<tr >
<td colspan="2"><em>个性签名:</em>__每个城市都会下雨,——”就像我,+无论走到哪里,.——都会,,Q——想起你..</td>
</tr><tr class="bg">
<td colspan="2"><em>学历:</em>中专/技校</td>
</tr><tr >
<td colspan="2"><em>生活习惯:</em>不抽烟不喝酒的好青年</td>
</tr><tr class="bg">
<td colspan="2"><em>最看重异性的:</em>诚意</td>
</tr><tr >
<td colspan="2"><em>最不能忍受异性缺点:</em>没内涵</td>
</tr><tr class="bg">
<td colspan="2"><em>做饭水平:</em>不错,一直努力学习中</td>
</tr><tr >
<td colspan="2"><em>我养过的宠物:</em>狗、猫咪</td>
</tr><tr class="bg">
<td colspan="2"><em>K歌必点歌曲:</em>i miss you</td>
</tr><tr >
<td colspan="2"><em>令你最难忘的事:</em>和同学们在一起生活的日子</td>
</tr><tr class="bg">
<td colspan="2"><em>睡姿:</em>睡着了谁知道啊</td>
</tr><tr >
<td colspan="2"><em>喜欢的零食:</em>差不多都可以接受</td>
</tr><tr class="bg">
<td colspan="2"><em>喜欢的水果:</em>有啥吃啥</td>
</tr><tr >
<td colspan="2"><em>喜欢的颜色:</em>清爽的都喜欢</td>
</tr><tr class="bg">
<td colspan="2"><em>喜欢的数字:</em>3</td>
</tr><tr >
<td colspan="2"><em>喜欢的运动:</em>所有的</td>
</tr><tr class="bg">
<td colspan="2"><em>喜欢的歌:</em>差不多都喜欢</td>
</tr><tr >
<td colspan="2"><em>喜欢的电影/电视剧:</em>蓝色生死恋</td>
</tr><tr class="bg">
<td colspan="2"><em>人生格言:</em>爱别人,也爱自己</td>
</tr><tr >
<td colspan="2"><em>个人着装:</em>随便,好看就行</td>
</tr><tr class="bg">
<td colspan="2"><em>约会时谁买单:</em>到时再说</td>
</tr><tr >
<td colspan="2"><em>血型:</em>保密</td>
</tr><tr class="bg">
<td colspan="2"><em>理想的对象:</em>和善 友好</td>
</tr> </table>

<p class="more clear"><a href="javascript:void(0);" class="ico_fold_up" onclick="loveinfo_show_more();return false;" id="personal_loveinfo_more_text">更多个性资料(22项)</a></p>
</div>
<p class="box_wrap_bottom"><span class="v_width"></span></p>
</div>
<div class="box_wrap" id="loveinfo_my_photo_div">
<p class="box_wrap_top"><span class="v_width"></span></p>
<div class="contain">
<div class="special_title clear">
<h6>我的照片</h6>
</div>
<a name="photo12452"></a>
<div class="my_photo" style="border:0;">
<ul class="photo_list0927 clear">
<li>
<div class="img_box img_130"><a href="#" onclick="loveinfo_personal_hide_data('photo')"><img onload="newsphotoresize(this,130);" src="http://images22.51img1.com/7000/3409855/2aa31db2db68a46c309437ed0e39af91.jpg"/></a></div><p><a href="#" onclick="loveinfo_personal_hide_data('photo')"></a></p>
</li>

</ul>
</div>
<div class="more clear"><a class="ico_fold_up" href="/dandanainilove/photo">更多本人照片<span style="font-weight:normal;">(1009张)</span></a></div> </div>
<p class="box_wrap_bottom"><span class="v_width"></span></p>
</div>


</div>
</div>
<div class="personal_right" id="personal_right_id">
<p class="top"></p>
<div class="home_box clearall">
<div class="title clearall"><h3>随机推荐</h3><a href="javascript:void(0);" class="refresh" onclick="$.get('/?u=dandanainilove&c=act&a=loveinforanduser',{},function(randuserlist){
$('#loveinforanduser').html(randuserlist);
});return false;">换一批</a></div>
<ul class="user_list clearall" id="loveinforanduser">
<li>
<div class="img_wrap">
<div class="img_box img_80"><a href="/kaixinguo148/loveinfo" onclick="home_statistic(88)"><img src="http://p3.u.51img1.com/3b/de/kaixinguo148_80.gif?v=20110514002003" /></a></div>
</div>
<p><a href="/kaixinguo148/loveinfo" title="爱琴海畔" onclick="home_statistic(88)">爱琴海畔</a></p>
</li>
<li>
<div class="img_wrap">
<img src="http://static.51img1.com/v3/home/loveinfo/images/online.gif" class="online"> <div class="img_box img_80"><a href="/ya25ding/loveinfo" onclick="home_statistic(88)"><img src="http://p5.u.51img1.com/5e/7b/ya25ding_80.gif?v=20110502183022" /></a></div>
</div>
<p><a href="/ya25ding/loveinfo" title="ゞ会员卡ぐ" onclick="home_statistic(88)">ゞ会员卡ぐ</a></p>
</li>
<li>
<div class="img_wrap">
<img src="http://static.51img1.com/v3/home/loveinfo/images/online.gif" class="online"> <div class="img_box img_80"><a href="/wjf13728316112/loveinfo" onclick="home_statistic(88)"><img src="http://p2.u.51img1.com/2e/1d/wjf13728316112_80.gif?v=20090504111348" /></a></div>
</div>
<p><a href="/wjf13728316112/loveinfo" title="飘叶" onclick="home_statistic(88)">飘叶</a></p>
</li>
<li>
<div class="img_wrap">
<img src="http://static.51img1.com/v3/home/loveinfo/images/online.gif" class="online"> <div class="img_box img_80"><a href="/guogegenihao/loveinfo" onclick="home_statistic(88)"><img src="http://pa.u.51img1.com/a9/55/guogegenihao_80.gif?v=20101123163200" /></a></div>
</div>
<p><a href="/guogegenihao/loveinfo" title="不在说痛︶ ̄" onclick="home_statistic(88)">不在说痛︶ ̄</a></p>
</li>
<li>
<div class="img_wrap">
<img src="http://static.51img1.com/v3/home/loveinfo/images/online.gif" class="online"> <div class="img_box img_80"><a href="/zhang451038673/loveinfo" onclick="home_statistic(88)"><img src="http://pf.u.51img1.com/fa/9a/zhang451038673_80.gif?v=20110412171930" /></a></div>
</div>
<p><a href="/zhang451038673/loveinfo" title="為げ ゼe戰" onclick="home_statistic(88)">為げ ゼe戰</a></p>
</li>
<li>
<div class="img_wrap">
<div class="img_box img_80"><a href="/liyafei1314/loveinfo" onclick="home_statistic(88)"><img src="http://p9.u.51img1.com/96/00/liyafei1314_80.gif?v=20110513160541" /></a></div>
</div>
<p><a href="/liyafei1314/loveinfo" title="( √:李.." onclick="home_statistic(88)">( √:李..</a></p>
</li>
</ul>
</div>
<p class="bottom"></p>
</div>
</div>
</div>
</div>


<script>
var p_personal_main_id_width = $("#p_personal_main_id").width();
var personal_main_id_width = p_personal_main_id_width - 335 + 43;

if(p_personal_main_id_width <= 620)
{
personal_main_id_width = p_personal_main_id_width - 153;
$("#personal_right_id").hide();
$("#personal_main_id").css({width:personal_main_id_width});
$(".v_width").css({width:(personal_main_id_width - 15)});
$(".p_personal_main .reply_fake").css({width:(personal_main_id_width - 60)});
$(".p_width").css({width:(personal_main_id_width - 120)});
}
else
{
$("#personal_main_id").css({width:personal_main_id_width});
$(".v_width").css({width:(personal_main_id_width - 15)});
$(".p_personal_main .reply_fake").css({width:(personal_main_id_width - 60)});
$(".p_width").css({width:(personal_main_id_width - 120)});
}
</script>



</div>
</div>
<div style="clear:both; width:100%; height:2px; overflow:hidden;"></div>
<div id="home_search_box" style="margin-bottom:-28px;z-index:2;">
<FORM name="bdfm" action="http://www.baidu.com/s" method="get" target="_blank"><table width="100%"><tbody><tr><td align="center" height="32" nowrap="nowrap" style="*padding-top:5px;*height:27px;"><INPUT type="hidden" name="tn" value="sh51_2_pg" /><INPUT type="hidden" name="ct" value="" /><INPUT type="hidden" name="lm" value="-1" /><INPUT type="hidden" name="kw" value="" /> <a target="_blank" href="http://www.baidu.com/index.php?tn=sh51_2_pg"><img src="http://static.51img1.com/v3/music/images/search1.gif?v=123" alt="baidu搜索" style="vertical-align:bottom;*top:-3px;margin-right:3px;" align="middle" border="0"></a><INPUT class="nav-search-input" onmouseover="this.focus()" onfocus="this.select()" onclick="if(this.value=='关键字')this.value=''" maxLength="100" size="31" name="word" value="关键字" style="font-size:12px;color:#626262;padding:2px;vertical-align:bottom;" /> <input type="submit" class="g_btn_1" value="搜索" name="" /></td></tr></tbody></table></form>
</div>
<div id="copyright" style="z-index:1;">
<span style="font-family:Arial;">2005-2011 © 51.com</span> 
<a href="http://passport.51.com/reg.5p" target="_blank">申请您的主页</a> | 
<a href="http://kf.51.com/yijian/index.php" target="_blank">问题、意见反馈</a>
</div>
<div id="themes_vip" style="display:none;">
</div><div class="html_bottom clear"></div><div id="sys_hide_box" style="display:none;"><ul id="commend_box_ul"><li id="commend_box_li" class="music_list_commend">
<div id="commend_box_li_1" class="music_commend_box">
<h4 id="commend_music_h4">评论</h4>
</div>
</li></ul><div id="replay_form_box" class="comment_post_form_box clear" style="clear:both;">
<form action="" method="post" name="pub_replay_forms" id="pub_replay_forms">
<p><span class="it_s"><textarea class="it1" id="replay_info_memo" name="replay_info_memo"></textarea></span></p>
<div class="comment_post_button clear">
<div class="left">
<img onclick="face51New.show(this,'replay_info_memo');" src="http://static.51img1.com/i/home/images/ubbface.gif" class="" id="comment_replay_but"/>
<input type="submit" class="g_btn" value="提交回复" id="pub_replay_submit"/>
</div>
</div>
</form>
</div><script type="text/javascript">bindRePlayAllEvent();</script><div id="commend_box" class="commend"><a name="go_to_comment"></a><div id="comment_post_form_box" class="comment_post_form_box clear">
<div class="photo imgborder"><a target="_blank" href="http://home.51.com/simayizhuo"><img height="50" border="0" width="50" src="http://pe.u.51img1.com/e1/b2/simayizhuo_50.gif?v=20080414183159"/></a></div>
<div style="float:left;">
<form id="pub_comment_forms" name="comment_post_form" method="post" action="">
<p><span class="it_s"><textarea name="comment_info_memo" id="comment_info_memo" class="it1"></textarea></span></p>
<div id="share_content_key" style="display:none;padding-right:0px; padding-left:0px; padding-bottom:5px; padding-top:5px;"><input type="checkbox" id="comment_isshare_checkbox" name="comment_isshare_checkbox" checked="checked" /> 评论同时发送给向我分享此内容的<span id="share_content_user"></span>
</div>
<div class="comment_post_button clear">
<div class="left">
<img id="comment_face_but" src="http://static.51img1.com/i/home/images/ubbface.gif" onclick="face51New.show(this,'comment_info_memo');" />
<input id="pub_comment_submit" type="submit" value="提交评论" class="g_btn" />
<input id="comment_info_hidden_checkbox" name="comment_info_hidden_checkbox" type="checkbox" class="lrspace" /><label for="comment_info_hidden_checkbox" title="选中此项后,该评论只有丹丹儿才能看到。">悄悄话</label>
</div>
</div>
</form>
</div>
</div>
<div class="gbook_con">
<ol id="commend_list" class="clearli"></ol>
<div id="commend_page_bar" class="page_bar small_page_bar hide">
<div id="commend_page_txt" class="pagination_txt"></div>
<div id="commend_page_bar1" class="pagination"></div>
</div>
</div>
</div><script type="text/javascript">bindCommentAllEvent();</script></div>
<div id="photo_view_popup" class="photo_view_popup" style="display:none;position:absolute;width:575px;z-index:900010;background:none;">
<table cellpadding="0" cellspacing="0" align="center">
<tr><td class="lt" height="12" width="10"></td><td class="mt" colspan="2"></td><td class="rt" width="15"></td></tr>
<tr><td class="lm" height="23"></td><td valign="top" style="background:#fff;">
<div class="vcontrol">
<a href="javascript:void(0);" onclick="rotateRLPhotosWin(1);return false;" class="ico_last">向左转</a>|<a href="javascript:void(0);" onclick="rotateRLPhotosWin(0);return false;" class="ico_next">向右转</a>|<a id="photo_view_popup_bigimg" href="javascript:void(0);" target="_blank" class="ico_lookpic">查看原图</a>|<a href="javascript:void(0);" onclick="showPhotoNewsComment();return false;" class="ico_pcommend">发表评论</a>
<div id="photo_view_commend" summary="0" class="photo_view_commend png" style="display:none;">
<form id="pub_comment_forms1" name="comment_post_form1" method="post" action="" >
<span class="it_s"><textarea id="comment_info_memo1" name="comment_info_memo1" class="it1"></textarea></span>
<p><input id="pub_comment_submit1" name="pub_comment_submit1" type="submit" value="提交评论" class="g_btn" /><input id="comment_info_hidden_checkbox1" name="comment_info_hidden_checkbox1" type="checkbox" class="lrspace" /><label for="comment_info_hidden_checkbox1" title="选中此项后,该评论只有dandanainilove才能看到。">悄悄话</label></p><input id="pub_comment_exit" name="pub_comment_exit" type="button" onclick="showPhotoNewsComment();" value="取消" class="g_btn rightbtn" />
</form>
</div>
</div>
</td>
<td align="right" valign="top" style="background:#fff;"><a href="javascript:void(0);" onclick="hideNewPhotosWin();return false;" class="close_view"></a></td><td class="rm"></td></tr>
<tr><td class="lm"></td><td id="photo_view_popup_td" onmouseout="mousePhotosWinOut(event);" onmousemove="mousePhotosWinMove(event);" colspan="2" width="550" height="380" align="center" style="background:#fff;"><img id="photo_view_popup_src" src="http://static.51img1.com/homeskins/public/images/photo_loading.gif" width="16" /></td><td class="rm"></td></tr>
<tr><td class="lb" height="15"></td><td class="mb" colspan="2"></td><td class="rb"></td></tr>
</table>
<div>
<a id="photo_view_popup_l_link" href="javascript:void(0);" onclick="agoafterPhotosWin(1);return false;" class="btn_last png" style="outline:none;display:none;" hideFocus="true">前一张</a>
<a id="photo_view_popup_r_link" href="javascript:void(0);" onclick="agoafterPhotosWin(0);return false;" class="btn_next png" style="outline:none;display:none;" hideFocus="true">后一张</a>
<p class="num"><span id="photo_view_popup_nonum">0</span>/<span id="photo_view_popup_total" class="totalnum">0</span></p>
</div>
</div>
<script type="text/javascript" src="http://static.51img1.com/stats/stats_path.js?v=20091224"></script>
<script type="text/javascript" defer="defer">_51ebro.go();</script>


<div id="loveinfo_personal_mask" style="z-index:5000;display:none;position:absolute;background-color:#000000;filter:Alpha(opacity=50);-moz-opacity:.5;opacity:0.5;left:0;top:0;"></div>

<div class="home_guide" id="loveinfo_personal_div_id_empty" style="z-index:10000;position:absolute;display:none;">
<a href="javascript:void(0);" class="close" onclick="loveinfohidepersonaldiv('empty');return false;">×</a>
<span class="arrow"></span>
<p class="guide_top"></p>
<div class="guide_con clear">
<p class="alert"><b>醉望秋月,</b>我的资料填的比你多哦!<br>想看我的资料的话,先去完善下你的资料吧!</p>
<p class="btn">
<a href="/?u=simayizhuo&c=loveinfo&state=uppersonal" class="postbtn" target="_blank" style="margin-right:20px;"><span>去完善我的资料<b style="font-weight:normal;">(推荐)</b></span></a>
<a href="javascript:void(0)" onclick="loveinfohidepersonaldiv('empty');return false;" class="postbtn"><span>取消</span></a>
</p>
</div>
<p class="guide_bottom"></p>
</div>

<div class="home_guide" id="loveinfo_personal_div_id_nologin" style="z-index:10000;position:absolute;display:none;">
<a href="javascript:void(0);" class="close" onclick="loveinfohidepersonaldiv('nologin');return false;">×</a>
<span class="arrow"></span>
<p class="guide_top"></p>
<div class="guide_con clear">
<p class="alert"><b>醉望秋月,</b>您还没有登录呢,登录后才能看到我的个人信息!</p>
<p class="btn"><a href="http://passport.51.com/passport.5p?gourl=http%3A%2F%2Fhome.51.com%2Fdandanainilove%2Floveinfo" class="postbtn"><span>登录</span></a>   <a href="http://passport.51.com/reg2.5p" target="_blank">注册我的51账号</a></p>
</div>
<p class="guide_bottom"></p>
</div>

<div class="home_guide" id="loveinfo_personal_div_id_nologinphoto" style="z-index:10000;position:absolute;display:none;">
<a href="javascript:void(0);" class="close" onclick="loveinfohidepersonaldiv('nologinphoto');return false;">×</a>
<span class="arrow"></span>
<p class="guide_top"></p>
<div class="guide_con clear">
<p class="alert"><b>醉望秋月,</b>你还没有登录呢!<br>想看我的照片的话,先去登录吧!</p>
<p class="btn"><a href="http://passport.51.com/passport.5p?gourl=http%3A%2F%2Fhome.51.com%2Fdandanainilove%2Floveinfo" class="postbtn"><span>登录</span></a>   <a href="http://passport.51.com/reg2.5p" target="_blank">注册我的51账号</a></p>
</div>
<p class="guide_bottom"></p>
</div>

<div class="home_guide" id="loveinfo_personal_div_id_nophoto" style="z-index:10000;position:absolute;display:none;">
<a href="javascript:void(0);" class="close" onclick="loveinfohidepersonaldiv('nophoto');return false;">×</a>
<span class="arrow"></span>
<p class="guide_top"></p>
<div class="guide_con clear">
<p class="alert"><b>醉望秋月,</b>你连一张照片都没有呢!<br>想看我的照片的话,先去上传一张你自己的吧!</p>
<p class="btn">
<a href="/?u=simayizhuo&c=loveinfo&state=upphoto" class="postbtn" target="_blank" style="margin-right:20px;"><span>去上传我的照片<b style="font-weight:normal;">(推荐)</b></span></a>
<a href="javascript:void(0)" onclick="loveinfohidepersonaldiv('nophoto');return false;" class="postbtn"><span>取消</span></a>
</p>
</div>
<p class="guide_bottom"></p>
</div>

<div class="p_personal_main" style="padding:26px 0;display:none;background:url(http://static.51img1.com/v3/home/loveinfo/images/step2pic.gif) no-repeat scroll 140px 10px; z-index: 5001;height: 67px; position: absolute; left: 370.5px; top: 635px; width: 295px;" id="loveinfo_personal_div_id_hi">
<a onclick="loveinfohidepersonaldiv('hi');jiahaoyou(3409855 , 'home');return false;" class="button_add" href="javascript:void(0);"><i class="ico_jy">打 招 呼</i></a>
<a onclick="loveinfohidepersonaldiv('hi');return false;" style="display: block; text-decoration: none; width: 11px; height: 11px; position: absolute; top: 20px; right: 10px;" href="javascript:void(0);"> </a>
</div>

<div class="g_pop arrow_left pop_change_theme" id="loveinfo_personal_div_id_help1" style="z-index:10000;position:absolute;display:none;">
<div class="g_pop_wrap">
<a href="javascript:void(0);" class="close" onclick="loveinfo_viewed(1,'close');return false;">关闭</a>
<span class="arrow"></span>
<div class="g_pop_contain">
<div class="changetheme">
<div class="title clear"><h3></h3></div>
<div class="contain">
<img src="http://pic.51img1.com/homeskins/public/images/guide_theme_1.jpg" />
<div class="btn_area t_c"><span class="g_btn_w"><input type="button" value="下一步" class="g_btn" onclick="loveinfo_help(2);" /></span><span class="step">1/3</span></div>
</div>
</div>
</div>
</div>
</div>
<div class="g_pop arrow_up pop_change_theme pop_change_theme_2" id="loveinfo_personal_div_id_help2" style="z-index:10000;position:absolute;display:none;">
<div class="g_pop_wrap">
<a href="javascript:void(0);" class="close" onclick="loveinfo_viewed(2,'close');return false;">关闭</a>
<span class="arrow"></span>
<div class="g_pop_contain">
<div class="changetheme">
<div class="title clear"><h3></h3></div>
<div class="contain">
<img src="http://pic.51img1.com/homeskins/public/images/guide_theme_2.jpg" />
<div class="btn_area t_c"><span class="g_btn_w"><input type="button" value="下一步" class="g_btn" onclick="loveinfo_help(3);" /></span><span class="step">2/3</span></div>
</div>
</div>
</div>
</div>
</div> 
<div class="g_pop arrow_up pop_change_theme pop_change_theme_3" id="loveinfo_personal_div_id_help3" style="z-index:10000;position:absolute;display:none;">
<div class="g_pop_wrap">
<a href="javascript:void(0);" class="close" onclick="loveinfo_viewed(3,'close');return false;">关闭</a>
<span class="arrow"></span>
<div class="g_pop_contain">
<div class="changetheme">
<div class="title clear"><h3></h3></div>
<div class="contain">
<img src="http://pic.51img1.com/homeskins/public/images/guide_theme_3.jpg" />
<div class="btn_area t_c"><span class="g_btn_w"><input type="button" value="完 成" class="g_btn" onclick="loveinfo_viewed(3,'close');" /></span><span class="step">3/3</span></div>
</div>
</div>
</div>
</div>
</div> 


</body>
</html>
发表于 2011-5-21 21:46:31 | 显示全部楼层
strong.*?>(.*?)(?=\<\/strong)
发表于 2011-5-21 21:59:24 | 显示全部楼层
$sText = ''  ;你的网页源码!
$aSre = StringRegExp($sText, '[^><]+(?=<\/strong)', 3)
If IsArray($aSre) Then MsgBox(0, '', $aSre[0])

评分

参与人数 1金钱 +20 收起 理由
xiaozui + 20 非常感谢超版的热心帮忙

查看全部评分

发表于 2011-5-21 22:13:10 | 显示全部楼层
回复 11# 水木子
多日未见水木兄了.可好?
发表于 2011-5-21 22:27:10 | 显示全部楼层
回复 12# 3mile
一切都好,多谢3G关心。
天天都在,只是最近发言少些,3G最近回复挺多哦!向3G学习。

评分

参与人数 1金钱 +10 收起 理由
3mile + 10 我的脸红了

查看全部评分

 楼主| 发表于 2011-5-21 22:28:39 | 显示全部楼层
回复  xiaozui

    $str=StringRegExpReplace($str,'','')
$str=StringRegExpReplace($str,'.*>([^
love5173 发表于 2011-5-21 21:22




兄弟你说得对哦,我直接说我遇到的问题吧,我想获取http://home.51.com/simayizhuo/loveinfo这个网页源码中的一个字符串,也就是该主页主人昵称(像这个网页,我要提取的是“醉望秋月”)。我写了以下代码,但实现不了,兄弟能帮忙么?
 
#include <Ie.au3>
#Include <Array.au3>
$IE_Visit_loveinfo = _IECreate("http://home.51.com/simayizhuo/loveinfo")
$sHtm = _IEDocReadHTML($IE_Visit_loveinfo)
$Array=StringRegExp ($sHtm, '<d[^>]<s[^>].*</s.*>',3)
$str=_ArrayToString($Array)
$strecho=stringregexpreplace($str,'<[^>]*>','')
msgbox(64,"tips",$strecho)
 楼主| 发表于 2011-5-21 22:37:41 | 显示全部楼层
水木子 发表于 2011-5-21 21:59


谢谢超版,麻烦看下我这样写是哪里出了问题,没见效果。如果正确应该可以看到“醉望秋月”这个字符串的
#include <Ie.au3>
#Include <Array.au3>
$IE_Visit_loveinfo = _IECreate("http://home.51.com/simayizhuo/loveinfo")
$sText = _IEDocReadHTML($IE_Visit_loveinfo)
$aSre = StringRegExp($sText, '[^><]+(?=<\/strong)', 3)
If IsArray($aSre) Then MsgBox(0, '', $aSre[0])
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-14 14:34 , Processed in 0.111131 second(s), 31 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表