kindeditor的使用和一些小问题。。。

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/huohua0612/article/details/78977663

1.首先引入kindedietor框架:

<script charset="utf-8"src="../kindeditor/kindeditor-all.js"></script>

<script charset="utf-8"src="../kindeditor/lang/zh-CN.js"></script>

2.编写<textArea  id=”area”></textArea>标签

3.编写<script  type=”text/javaScript”></script>引入kindeditor。

<script type=”text/javaScript”>

var editor;

 KindEditor.ready(function(K) {

微笑微笑微笑微笑

afterBlur:function(){ 

        this.sync(); 

     }

这一步是最重要的。如果没有它,这个<textare>标签里的值就无法获取到哦

 

   微笑微笑微笑微笑

 editor = K.create('#content', {

    afterBlur:function(){ 

        this.sync(); 

     } 

    });

});

//获取<textare>标签的值,

这里用jquery的方式获取

varvalue_content =$('#content').val();

</script>

展开阅读全文

使用javabean的一些小问题

10-21

各位大虾:rn 我做的关于数据库操作的javabean:rn package test;rnrnimport java.sql.*;rnimport java.io.*;rnimport java.lang.*;rnrnpublic class DbSqlrnrn String sDBDriver = "COM.ibm.db2.jdbc.net.DB2Driver";rn String sConnStr = "jdbc:db2://202.117.106.64:5000/xuebao";rn String sUser = "db2inst1";rn String sPassword = "db2inst1";rn Connection conn = null;rn ResultSet rs = null;rn public DbSql()rn rn try rn rn Class.forName(sDBDriver);rn rn catch(java.lang.ClassNotFoundException e)rn rn System.err.println("DbSql(): " + e.getMessage());rn rn rn public ResultSet executeQuery(String sql)rn rn rs = null;rn tryrn rn conn = DriverManager.getConnection(sConnStr,sUser,sPassword);rn Statement stmt = conn.createStatement();rn rs = stmt.executeQuery(sql);rn rn catch(SQLException ex)rn rn System.err.println("DbSql.executeQuery:"+ex.getMessage());rn rn return rs;rn rn public void executeInsert(String sql)rn rn tryrn rnrn conn = DriverManager.getConnection(sConnStr,sUser,sPassword);rn PreparedStatement stmt = conn.prepareStatement(sql);rn stmt.executeUpdate();rn rn catch(SQLException ex)rn rn System.err.println("DbSql.executeUpdate:"+ex.getMessage());rn rn rnrn public void executeDelete(String sql)rn rn tryrn rn conn = DriverManager.getConnection(sConnStr,sUser,sPassword);rn Statement stmt = conn.createStatement();rn stmt.executeUpdate(sql);rn rn catch(SQLException ex)rn rn System.err.println("DbSql.executeUpdate:"+ex.getMessage());rn rn rnrn public void executeUpdate(String sql)rn rn tryrn rn conn = DriverManager.getConnection(sConnStr,sUser,sPassword);rn Statement stmt = conn.createStatement();rn stmt.executeUpdate(sql);rn rn catch(SQLException ex)rn rn System.err.println("DbSql.executeUpdate:"+ex.getMessage());rn rn rnrnrn在jsp中使用的时候用于一般的关于英文的查询,更新操作都是成功的,所谓关于英文的意思是传递的变量值是英文符号,但是只要中间有中文符号就不对了,比如说牵扯到中文用户名的查询之类的,系统就不会执行数据库操作。这到底是什么原因阿?rn我的数据库是db2,我在主级上用sql语句可以插入查询中文,是怎么回事啊?rn很急!!!!! 论坛

没有更多推荐了,返回首页