在winform中解析html标签
最近在弄公司的系统时遇到一个问题,有一个winform要调用网站的数据库,数据库中存的是经过eWebEditor处理过的文章,都带有html标签,当时想用正则表达式过滤掉,但是还是放弃了原因有三:1.我对正则表达式了解很少;2.虽说我可以现学正则表达式,但是实现起来也是很麻烦的;3.如果过滤掉的话文章的格式就没有了。于是上网找这方面的控件,不是很理想。最后在百度知道上100分悬赏找到了解决方法,很简单的,不需要第三方控件,直接用WebBrower就能实现,用到了WebBrower.DocumentText属性,比如要显示的html代码如下:adc</br>def,则可用下面方法解析显示:
string str = "abc</br>def"; //实际是数据库中的文章
WebBrower.DocumentText = str; //显示
相关文档:
<%
int a =1;
out.println("<input type='checkbox' value='"+a+"'>");
%>
<%int b =1 ;%>
<i ......
html 网页描述语言
html的基本框架
<head> //标签头
<javacript> &nb ......
先来看段代码:
document.domain = 'ray.com';
这段代码到底是什么意思呢?
首先,我们来看下HTML DOM 关于这个的说明:
domain of type DOMString, readonlyThe domain name of the server that served the document, or null if the server cannot be identified by a domain name.
这段话的意思是这个值是DO ......
例如从1.html跳转到2.html:
在1.html中:
<form name="loginForm" action="2.htm?pageid=1&str='s'" method="post">
当页面提交跳转到2.html中:
<script type="text/javascript">
<!--
var str = location.search;
//-->
&l ......
前台 <form id="form1" runat="server" enctype="multipart/form-data">
<input type="flie" id="xxx">
</form>
后台通过 HttpPostedFile f = Request.Files["xxx"]
接收就可以了 ......