EDIT控件内有n多字符,
唯一不变的字符串是window.location = 等号后面是"xxx.xxx.com/xxx.xxx.html"
请问我如何根据window.location =字符串得到其后面的引号内的内容呢?xxx.xxx.com/xxx.xxx.html经常变化包括长度
唯一不变的字符串是window.location = 等号后面是"xxx.xxx.com/xxx.xxx.html"
请问我如何根据window.location =字符串得到其后面的引号内的内容呢?xxx.xxx.com/xxx.xxx.html经常变化包括长度
text.Replace("window.location =","");
text.Replace("\"","");
能说的详细点吗,我是刚学MFC的新手
但引号内的字符经常变化,
有时候变成
window.location = "http://222.40.28.1:80";;
window.location = "http://202.102.224.68:8828";;
在要取数据时这样操作UpdateData();
m_text.Replace("window.location =","");
m_text.Replace("\"","");
这样就可以了
{ UpdateData();
m_text.Replace("window.location =","");
m_text.Replace("\"","");
SetDlgItemText(IDC_EDIT2, _T(m_text));
}
在IDC_EDIT2显示不出来想要的内容呀
{ UpdateData();
m_text.Replace("window.location =","");
m_text.Replace("\"","");
SetDlgItemText(IDC_EDIT2, _T(m_text));
UpdateData(FALSE);
}
<HTML>
<HEAD>
<TITLE>网易免费域名转向系统</TITLE>
<META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=gb2312>
</HEAD>
<BODY BGCOLOR=#EAEAEA><table border=0 cellpadding=0 cellspacing=0 width=440 align=center style=margin-top:70px>
<tr>
<td width=395>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td width=180 valign=bottom><a href=http://my.yeah.net/ target=_blank><img src=http://images.163.com/images/netease/yeah/d_logo_yeah.gif width=180 height=32 vspace=2 border=0 alt=注册属于你的免费域名></a></td>
<td width=120></td>
<td width=95 align=right><a href=http://www.163.com target=_blank><img src=http://images.163.com/images/netease/yeah/netease_logo.gif width=95 vspace=4 border=0></a></td>
</tr>
</table>
</td>
<td width=45></td>
</tr>
<tr>
<td>
<table border=0 cellpadding=0 cellspacing=6 width=100% height=300 bgcolor=#FFFFFF>
<tr>
<td align=center>
<!--广告图片请放在这里-->
<iframe
src=http://adclient.163.com/html.ng/site=netease&affiliate=domain126&cat=homepage&type=popwin&location=1 width=400 height=300 frameborder=no border=0 marginwidth=0 marginheight=0 scrolling=no>
</iframe>
</td>
</tr>
</table>
</td>
<td valign=bottom><img src=http://images.163.com/images/netease/yeah/yy.gif width=45></td>
</tr>
<tr>
<td align=center><form name=loading>
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr>
<TD align=center valign=top>
<p><FONT color=000000 face=Arial><BR>
页面载入中,请等待</FONT></p>
<p><input type=text name=chart size=46 style=font-family:Arial; font-weight:bolder; color:black; background-color:#EAEAEA; padding:0px; border-style:none;>
<br>
<input type=text name=percent size=46 style=font-family:Arial; color:black; background-color:#EAEAEA;text-align:center; border-width:medium; border-style:none;>
<script>var bar = 0
var line = ||
var amount =||
count()
function count(){
bar= bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+%
if (bar<99)
{setTimeout(count(),200);}
else
{ http://61.158.160.88:8828;;}
}
</script></p></TD>
</tr>
</table>
</FORM></td>
<td></td>
<tr>
</table>
<!-- START NNR Site Census V5.1 -->
<!-- COPYRIGHT 2004 Nielsen // Netratings -->
<script language=JavaScript type=text/javascript>
<!--
var _rsCI=cn-netease;
var _rsCG=0;
var _rsDT=0;
var _rsDU=0;
var _rsDO=0;
var _rsX6=0;
var _rsSI=escape(window.location);
var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';
var _rsRP=escape(document.referrer);
var _rsND=_rsLP+'//secure-cn.imrworldwide.com/'; if (parseInt(navigator.appVersion)>=4)
{
var _rsRD=(new Date()).getTime();
var _rsSE=1;
var _rsSV=;
var _rsSM=0.01;
_rsCL='<scr'+'ipt language=JavaScript type=text/javascript src='+_rsND+'v51.js></scr'+'ipt>';
}
else
{
_rsCL='<img src='+_rsND+'cgi-bin/m?ci='+_rsCI+'&cg='+_rsCG+'&si='+_rsSI+'&rp='+_rsRP+'>';
}
document.write(_rsCL);
//-->
</script>
<noscript>
<img src=//secure-cn.imrworldwide.com/cgi-bin/m?ci=cn-netease&cg=0 alt=>
</noscript>
<!-- END NNR Site Census V5.1 --></BODY>
</HTML>
这是EDIT2的内容<HTML>
<HEAD>
<TITLE>网易免费域名转向系统</TITLE>
<META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=gb2312>
</HEAD>
<BODY BGCOLOR=#EAEAEA><table border=0 cellpadding=0 cellspacing=0 width=440 align=center style=margin-top:70px>
<tr>
<td width=395>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td width=180 valign=bottom><a href=http://my.yeah.net/ target=_blank><img src=http://images.163.com/images/netease/yeah/d_logo_yeah.gif width=180 height=32 vspace=2 border=0 alt=注册属于你的免费域名></a></td>
<td width=120></td>
<td width=95 align=right><a href=http://www.163.com target=_blank><img src=http://images.163.com/images/netease/yeah/netease_logo.gif width=95 vspace=4 border=0></a></td>
</tr>
</table>
</td>
<td width=45></td>
</tr>
<tr>
<td>
<table border=0 cellpadding=0 cellspacing=6 width=100% height=300 bgcolor=#FFFFFF>
<tr>
<td align=center>
<!--广告图片请放在这里-->
<iframe
src=http://adclient.163.com/html.ng/site=netease&affiliate=domain126&cat=homepage&type=popwin&location=1 width=400 height=300 frameborder=no border=0 marginwidth=0 marginheight=0 scrolling=no>
</iframe>
</td>
</tr>
</table>
</td>
<td valign=bottom><img src=http://images.163.com/images/netease/yeah/yy.gif width=45></td>
</tr>
<tr>
<td align=center><form name=loading>
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr>
<TD align=center valign=top>
<p><FONT color=000000 face=Arial><BR>
页面载入中,请等待</FONT></p>
<p><input type=text name=chart size=46 style=font-family:Arial; font-weight:bolder; color:black; background-color:#EAEAEA; padding:0px; border-style:none;>
<br>
<input type=text name=percent size=46 style=font-family:Arial; color:black; background-color:#EAEAEA;text-align:center; border-width:medium; border-style:none;>
<script>var bar = 0
var line = ||
var amount =||
count()
function count(){
bar= bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+%
if (bar<99)
{setTimeout(count(),200);}
else
{ http://61.158.160.88:8828;;}
}
</script></p></TD>
</tr>
</table>
</FORM></td>
<td></td>
<tr>
</table>
<!-- START NNR Site Census V5.1 -->
<!-- COPYRIGHT 2004 Nielsen // Netratings -->
<script language=JavaScript type=text/javascript>
<!--
var _rsCI=cn-netease;
var _rsCG=0;
var _rsDT=0;
var _rsDU=0;
var _rsDO=0;
var _rsX6=0;
var _rsSI=escape(window.location);
var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';
var _rsRP=escape(document.referrer);
var _rsND=_rsLP+'//secure-cn.imrworldwide.com/'; if (parseInt(navigator.appVersion)>=4)
{
var _rsRD=(new Date()).getTime();
var _rsSE=1;
var _rsSV=;
var _rsSM=0.01;
_rsCL='<scr'+'ipt language=JavaScript type=text/javascript src='+_rsND+'v51.js></scr'+'ipt>';
}
else
{
_rsCL='<img src='+_rsND+'cgi-bin/m?ci='+_rsCI+'&cg='+_rsCG+'&si='+_rsSI+'&rp='+_rsRP+'>';
}
document.write(_rsCL);
//-->
</script>
<noscript>
<img src=//secure-cn.imrworldwide.com/cgi-bin/m?ci=cn-netease&cg=0 alt=>
</noscript>
<!-- END NNR Site Census V5.1 --></BODY>
</HTML>
这是在windows vista下打开的代码
我也不知道2000和vista下为什么会不一样
GetDlgItem(IDC_EDIT1)->GetWindowText(text);
int start = text.Find("window.location =")+18;
int end =text.Find('"',start);
text =text.Mid(start,end-start);
GetDlgItem(IDC_EDIT2)->SetWindowText(text);
为什么用
CString text;
GetDlgItem(IDC_EDIT1)->GetWindowText(text);
int start = text.Find("window.location =")+18;
int end =text.Find('"',start);
text =text.Mid(start,end-start);
GetDlgItem(IDC_EDIT2)->SetWindowText(text);
在EDIT2里面什么也不显示呢?
找不能这显示什么呀?
asdasd{window.location = "http://61.158.160.88:8828"aaaaaaaaaaa
怎么edit2什么也不显示现在edit1的内容是
{window.location = "http://61.158.160.88:8828";;}}
问题如何在edit2里面显示双引号内的全部字符
GetDlgItem(IDC_EDIT1)->GetWindowText(text);
int start = text.Find("window.location =");
start =text.Find('"',start)+1;
int end =text.Find('"',start);
text =text.Mid(start,end-start);
GetDlgItem(IDC_EDIT2)->SetWindowText(text);
马上揭帖