⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.jsp

📁 一个网上的文本编辑工具源码,jsp实现的,在自己的网站中可以直接使用.效果很好
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" %>
<HTML>
<HEAD>
<TITLE>我的例子</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
body,td,input,textarea {font-size:9pt}
</style>

<SCRIPT>function test()
{
  String sContent = new String(request.getParameter("content1").getBytes("iso8859_1"));
	System.out.println();
	System.out.println();
	System.out.println();
	System.out.println();
	System.out.println();
	System.out.print("取得的html标记:"+"\n"+sContent+"\n"+"主要问题可能出现在upload.jsp里的第202行的setHtml()");
        out.println("编辑的内容如下:<br><br>"+sContent);
        out.println(
      "<br><br><p><input type=button value=' 退回 ' onclick='history.back()'></p>");
}
</SCRIPT>

</HEAD>
<BODY>

<FORM >
<TABLE border="0" cellpadding="2" cellspacing="1">
<TR>
	<TD>编辑内容:</TD>
	<TD>
		<INPUT type="hidden" name="content1" value="<p>&nbsp;</p><p><font color=#ff0000>本样式为自带默认样式,最佳调用宽度650px,高度350px!</font></p><p>下面为一些高级调用功能的例子,你可以用脚本方便的编辑进行一些操作。</p><p>看到这些内容,且没有错误提示,说明安装已经正确完成!</p><p>您现在使用的是飞鱼修改版,有什么问题请到http://www.fiyu.net提出!</p>">
		<IFRAME ID="eWebEditor1" src="eWebEditor.jsp?id=content1&style=standard" frameborder="0" scrolling="no" width="650" height="350"></IFRAME>
	</TD>
</TR>
<TR>
	<TD colspan=2 align=right>
	<INPUT type="button" name=b1 onClick="test()" value="提交">
	<INPUT type=reset name=b2 value="重填">
	<INPUT type=button name=b3 value="查看源文件" onclick="location.replace('view-source:'+location)">
	</TD>
</TR>
<TR>
	<TD>取到内容:</TD>
	<TD><TEXTAREA cols=60 rows=5 id=myTextArea style="width:550px">点击“取值”按钮,看一下效果!</TEXTAREA></TD>
</TR>
<TR>
	<TD colspan=2 align=right>
	<INPUT type=button name=b4 value="取值" onclick="myTextArea.value=eWebEditor1.getHTML()">
	<INPUT type=button name=b5 value="赋值" onclick="eWebEditor1.setHTML('<b>赋值成功!</b>')">
	<INPUT type=button name=b6 value="代码状态" onclick="eWebEditor1.setMode('CODE')">
	<INPUT type=button name=b7 value="编辑状态" onclick="eWebEditor1.setMode('EDIT')">
	<INPUT type=button name=b8 value="预览状态" onclick="eWebEditor1.setMode('VIEW')">
	<INPUT type=button name=b9 value="当前位置插入" onclick="eWebEditor1.insertHTML('这是插入的内容!')">
	<INPUT type=button name=b10 value="尾部追加" onclick="eWebEditor1.appendHTML('这是在尾部追加的内容!')">
	</TD>
</TR>
</TABLE>
</FORM>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -