刚才孟子e章给的js 可是我不知道 怎么用进我的页中
我的控件是<asp:textbox id="Content" style="DISPLAY: none" runat="server"></asp:textbox>
小弟已无分 可给望大家见谅.
// 清除WORD冗余格式并粘贴
function cleanAndPaste( html ) {
// Remove all SPAN tags
html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
// Remove Class attributes
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove Style attributes
html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
// Remove Lang attributes
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove XML elements and declarations
html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
// Remove Tags with XML namespace declarations: <o:p></o:p>
html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
// Replace the
html = html.replace(/ /, " " );
// Transform <P> to <DIV>
var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ;// Different because of a IE 5.0 error
html = html.replace( re, "<div$2</div>" ) ;alert( html ) ;
}
我的控件是<asp:textbox id="Content" style="DISPLAY: none" runat="server"></asp:textbox>
小弟已无分 可给望大家见谅.
// 清除WORD冗余格式并粘贴
function cleanAndPaste( html ) {
// Remove all SPAN tags
html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
// Remove Class attributes
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove Style attributes
html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
// Remove Lang attributes
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove XML elements and declarations
html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
// Remove Tags with XML namespace declarations: <o:p></o:p>
html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
// Replace the
html = html.replace(/ /, " " );
// Transform <P> to <DIV>
var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ;// Different because of a IE 5.0 error
html = html.replace( re, "<div$2</div>" ) ;alert( html ) ;
}
解决方案 »
- 传值问题!!!脑子想的短路了...
- ASP.NET 3.5 Website Programming: Problem - Design - Solution
- VS2005的asp.net网站用VS2008编译会怎么样?
- web项目的安装项目怎么创建桌面快捷方式
- 帮忙检查一下看该存储过程错在哪里?
- 如何在.net的datagrid中实现vb的datagrid.fixedcols属性功能
- 关于用数据绑定的问题(可以加分)
- 急需车辆售票系统,急~急~急~急~谢谢了!
- Gridview索引超出范围。必须为非负值并小于集合大小。 参数名: index
- 谁解决这个对于你们巨简单的题,我就给谁20分
- 请教大伙儿一个DataGrid 的Footer的问题,急用阿!
- 请大家帮忙!在Visual Studio.net中如何删除一个项目?
<!--
function cleanAndPaste( html ) {
alert(html);
// Remove all SPAN tags
html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
// Remove Class attributes
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove Style attributes
html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
// Remove Lang attributes
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove XML elements and declarations
html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
// Remove Tags with XML namespace declarations: <o:p></o:p>
html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
// Replace the
html = html.replace(/ /, " " );
// Transform <P> to <DIV>
var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ;// Different because of a IE 5.0 error
html = html.replace( re, "<div$2</div>" ) ;alert( html ) ;
document.all.area1.value = html;}//-->
</SCRIPT>
<TEXTAREA id="area1" onchange ="cleanAndPaste(this.value)" ></TEXTAREA>