导航
  • 全部
...

高手呀!进来救救我把!发言者有分!!!(暴急!!!)

xihong123 2005-12-02 03:25:06
我的数据库中存着这样一段代码:

<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.怎么实现?


拜托各位了  我真的搞不定了.
...全文
给本帖投票
318 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangchaocn 2005-12-03
  • 打赏
  • 举报
回复
把数据保存到一个临时的*.htm文件中
然后用webbrowser中显示
xihong123 2005-12-03
  • 打赏
  • 举报
回复
天狼大哥,你的那段东西我都看了n遍了,就是用vb实现不了呀?
  我的手太底了.麻烦你用vb实现一下好吗??
   在下在这里先谢了!!!
bbhere 2005-12-03
  • 打赏
  • 举报
回复
up
射天狼 2005-12-03
  • 打赏
  • 举报
回复
用webbrowser控件,可以直接将内存中的HTML编辑显示到控件上,我的网站上有源码,不过是DELPHI的,你可以看看,原理都是一样的。

====================
免费的学习交流网站,欢迎大家访问!
http://www.j2soft.cn/
nj_tanghua 2005-12-03
  • 打赏
  • 举报
回复
关注
xihong123 2005-12-03
  • 打赏
  • 举报
回复
大哥!!你怎么没早来撒.早来我就不用费一袋烟的工夫了!!
  谢谢你呢!
  狼哥的方法好用,谁要用的就照他说的办把.我调试成功了!
northwolves 2005-12-03
  • 打赏
  • 举报
回复
不知你的HTML内容在数据库中如何保存,只要你能按字符串格式取出,上面的代码就能显示到WEBBROWSER中。
northwolves 2005-12-03
  • 打赏
  • 举报
回复
it's easy:
'add the following codes to form1 with a webbrowser control and a commandbutton:
'then copy your html codes to clipboard

Option Explicit

Private 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
xihong123 2005-12-03
  • 打赏
  • 举报
回复
各位,我调出来了,累死我了,就这点东西我搞了两天.谢谢各位的帮忙,其实大家说的都对,我是用你们说的方法做出来的,就是建立临时文件的方法但是有很多不方便.我把他做了个标准模块要是有需要的哥们就说一声我帖出来.
  谢谢各位,我等几天揭贴把,让还跟我一样的人看看,有所启发.
   还有请各位闲逛的大虾有好的办法说出来.在下不胜感激!!!
xihong123 2005-12-03
  • 打赏
  • 举报
回复
在下感谢各位的意见。
三 四楼的大哥.我是新手.见笑了.我现在有两个问题要问。

第一.怎么建立临时.htm文件。
第二.怎么把数据送给临时文件。
还望赐教!!!

zhzhq800204 2005-12-03
  • 打赏
  • 举报
回复
好多以前没遇到的情况,帮顶吧
zyg0 2005-12-03
  • 打赏
  • 举报
回复
用dhtmledit控件
xihong123 2005-12-03
  • 打赏
  • 举报
回复
第一.怎么建立临时.htm文件。
第二.怎么把数据送给临时文件。
还望赐教!!!
SensiblesImon 2005-12-03
  • 打赏
  • 举报
回复
...
province_ 2005-12-02
  • 打赏
  • 举报
回复
你的纯粹是HTML文件,哪有程序脚本,交给IE是最简单的,自己写解释程序并显示?太难了,可不只是太累的问题。
crycoming 2005-12-02
  • 打赏
  • 举报
回复
同意 roger_xiong(卖女孩的小火柴~)的方法
自己解释html太累了
roger_xiong 2005-12-02
  • 打赏
  • 举报
回复
把这些数据保存到一个临时的.htm文件中,然后在webbrowser中显示就可以了,不用那么麻烦。

xihong123 2005-12-02
  • 打赏
  • 举报
回复
大虾,能告诉我怎么用吗?
 你这段代码放哪儿用呀?
bbhere 2005-12-02
  • 打赏
  • 举报
回复
低手
帮顶!
jinjazz 2005-12-02
  • 打赏
  • 举报
回复
uses
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;

1,502

社区成员

发帖
与我相关
我的任务
社区描述
VB 网络编程
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧

手机看
关注公众号

关注公众号

客服 返回
顶部