我的数据库中存着这样一段代码:<html>
<head>
<style>
<!--
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Times New Roman";
margin-left:0cm; margin-right:0cm; margin-top:0cm}
-->
</style>
</head>
<body>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt">able</span><span style="font-size: 14.0pt; font-family: 宋体">/</span><span lang="EN-US" style="font-size:14.0pt">'eibl</span><span style="font-size: 14.0pt; font-family: 宋体">/</span></p>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt">n. </span>
<span style="font-size: 14.0pt; font-family: 宋体">有能力的:能干的</span></p>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt">be able to do sth</span><span style="font-size: 14.0pt; font-family: 宋体">.有能力干某事:能干某事</span></p>
<p class="MsoNormal" style="text-indent: 35.7pt; margin-left: 21.0pt">
<span lang="EN-US" style="font-size:14.0pt">From these facts I was able to tell
what goods the animal was carrying</span><span style="font-size: 14.0pt; font-family: 宋体">.我从这些事实就能说出这头牲口</span><span lang="EN-US" style="font-size:14.0pt">121</span><span style="font-size: 14.0pt; font-family: 宋体">驮的是什么货.</span></p>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt"> </span><span style="font-size: 14.0pt; font-family: 宋体">反义词:</span><span lang="EN-US" style="font-size:14.0pt">unable(</span><span style="font-size: 14.0pt; font-family: 宋体">不能的,无能力的</span><span lang="EN-US" style="font-size:14.0pt">)</span></p>
<p class="MsoNormal" style="text-indent: -35.0pt; margin-left: 56.75pt">
<span lang="EN-US" style="font-size:14.0pt"> </span><span style="font-size: 14.0pt; font-family: 宋体">注:</span><span lang="EN-US" style="font-size:14.0pt">1)be
able</span><span style="font-size: 14.0pt; font-family: 宋体">和</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">的比较:表示能力时,</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">和</span><span lang="EN-US" style="font-size:14.0pt">be
able</span><span style="font-size: 14.0pt; font-family: 宋体">可以交替使用.</span><span lang="EN-US" style="font-size:14.0pt">be
able</span><span style="font-size: 14.0pt; font-family: 宋体">在现在时和过去时中可以代替</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">,并用来补充</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">所没有的形式.如现在时中可以用</span><span lang="EN-US" style="font-size:14.0pt">am(is</span><span style="font-size: 14.0pt; font-family: 宋体">,</span><span lang="EN-US" style="font-size:14.0pt">are)able</span><span style="font-size: 14.0pt; font-family: 宋体">或</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">,过去时中可以用</span><span lang="EN-US" style="font-size:14.0pt">was(were)able</span><span style="font-size: 14.0pt; font-family: 宋体">或</span><span lang="EN-US" style="font-size:14.0pt">could</span><span style="font-size: 14.0pt; font-family: 宋体">,而在将来时中则只能用</span><span lang="EN-US" style="font-size:14.0pt">will(shall)beable</span><span style="font-size: 14.0pt; font-family: 宋体">,因为</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">除了表示“许可”外,不能用于将来时。例如:</span><span lang="EN-US" style="font-size:14.0pt">1
won't be able to see him today</span><span style="font-size: 14.0pt; font-family: 宋体">.我今天见不到他。</span></p>
<p class="MsoNormal" style="text-indent: 2.0cm">
<span lang="EN-US" style="font-size:14.0pt">2)</span><span style="font-size: 14.0pt; font-family: 宋体">参见</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">条.</span></p>
</body>
</html>我想把这段代码解析后显示在控件text1.text 或者在webbrowser控件中显示出来,
1.在vb中能实现这个功能吗>???
2.怎么实现?
拜托各位了 我真的搞不定了.
<head>
<style>
<!--
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Times New Roman";
margin-left:0cm; margin-right:0cm; margin-top:0cm}
-->
</style>
</head>
<body>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt">able</span><span style="font-size: 14.0pt; font-family: 宋体">/</span><span lang="EN-US" style="font-size:14.0pt">'eibl</span><span style="font-size: 14.0pt; font-family: 宋体">/</span></p>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt">n. </span>
<span style="font-size: 14.0pt; font-family: 宋体">有能力的:能干的</span></p>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt">be able to do sth</span><span style="font-size: 14.0pt; font-family: 宋体">.有能力干某事:能干某事</span></p>
<p class="MsoNormal" style="text-indent: 35.7pt; margin-left: 21.0pt">
<span lang="EN-US" style="font-size:14.0pt">From these facts I was able to tell
what goods the animal was carrying</span><span style="font-size: 14.0pt; font-family: 宋体">.我从这些事实就能说出这头牲口</span><span lang="EN-US" style="font-size:14.0pt">121</span><span style="font-size: 14.0pt; font-family: 宋体">驮的是什么货.</span></p>
<p class="MsoNormal" style="text-indent:21.75pt">
<span lang="EN-US" style="font-size:14.0pt"> </span><span style="font-size: 14.0pt; font-family: 宋体">反义词:</span><span lang="EN-US" style="font-size:14.0pt">unable(</span><span style="font-size: 14.0pt; font-family: 宋体">不能的,无能力的</span><span lang="EN-US" style="font-size:14.0pt">)</span></p>
<p class="MsoNormal" style="text-indent: -35.0pt; margin-left: 56.75pt">
<span lang="EN-US" style="font-size:14.0pt"> </span><span style="font-size: 14.0pt; font-family: 宋体">注:</span><span lang="EN-US" style="font-size:14.0pt">1)be
able</span><span style="font-size: 14.0pt; font-family: 宋体">和</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">的比较:表示能力时,</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">和</span><span lang="EN-US" style="font-size:14.0pt">be
able</span><span style="font-size: 14.0pt; font-family: 宋体">可以交替使用.</span><span lang="EN-US" style="font-size:14.0pt">be
able</span><span style="font-size: 14.0pt; font-family: 宋体">在现在时和过去时中可以代替</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">,并用来补充</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">所没有的形式.如现在时中可以用</span><span lang="EN-US" style="font-size:14.0pt">am(is</span><span style="font-size: 14.0pt; font-family: 宋体">,</span><span lang="EN-US" style="font-size:14.0pt">are)able</span><span style="font-size: 14.0pt; font-family: 宋体">或</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">,过去时中可以用</span><span lang="EN-US" style="font-size:14.0pt">was(were)able</span><span style="font-size: 14.0pt; font-family: 宋体">或</span><span lang="EN-US" style="font-size:14.0pt">could</span><span style="font-size: 14.0pt; font-family: 宋体">,而在将来时中则只能用</span><span lang="EN-US" style="font-size:14.0pt">will(shall)beable</span><span style="font-size: 14.0pt; font-family: 宋体">,因为</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">除了表示“许可”外,不能用于将来时。例如:</span><span lang="EN-US" style="font-size:14.0pt">1
won't be able to see him today</span><span style="font-size: 14.0pt; font-family: 宋体">.我今天见不到他。</span></p>
<p class="MsoNormal" style="text-indent: 2.0cm">
<span lang="EN-US" style="font-size:14.0pt">2)</span><span style="font-size: 14.0pt; font-family: 宋体">参见</span><span lang="EN-US" style="font-size:14.0pt">can</span><span style="font-size: 14.0pt; font-family: 宋体">条.</span></p>
</body>
</html>我想把这段代码解析后显示在控件text1.text 或者在webbrowser控件中显示出来,
1.在vb中能实现这个功能吗>???
2.怎么实现?
拜托各位了 我真的搞不定了.
ActiveX; procedure WB_LoadHTML(WebBrowser: TWebBrowser; HTMLCode: string);
var
sl: TStringList;
ms: TMemoryStream;
begin
WebBrowser.Navigate('about:blank');
while WebBrowser.ReadyState < READYSTATE_INTERACTIVE do
Application.ProcessMessages; if Assigned(WebBrowser.Document) then
begin
sl := TStringList.Create;
try
ms := TMemoryStream.Create;
try
sl.Text := HTMLCode;
sl.SaveToStream(ms);
ms.Seek(0, 0);
(WebBrowser.Document as IPersistStreamInit).Load(TStreamAdapter.Create(ms));
finally
ms.Free;
end;
finally
sl.Free;
end;
end;
end;
自己解释html太累了
三 四楼的大哥.我是新手.见笑了.我现在有两个问题要问。 第一.怎么建立临时.htm文件。
第二.怎么把数据送给临时文件。
还望赐教!!!
免费的学习交流网站,欢迎大家访问!
http://www.j2soft.cn/
我的手太底了.麻烦你用vb实现一下好吗??
在下在这里先谢了!!!
然后用webbrowser中显示
第二.怎么把数据送给临时文件。
还望赐教!!!
'add the following codes to form1 with a webbrowser control and a commandbutton:
'then copy your html codes to clipboardOption ExplicitPrivate Sub Command1_Click()
WebBrowser1.Navigate2 ("about:blank")
Do While WebBrowser1.ReadyState <> READYSTATE_COMPLETE
DoEvents
Loop
With WebBrowser1.Document
.Open
.write Clipboard.GetText' 你可以写入任意HTML源文件,从剪切板读取是为了简化代码。可以将HTML格式编码存入资源文件,字符串,INI文件,文本文件都可以。
.Close
End With
End Sub