主题: ces4.10版返回的值是一个逗号
作者: xiaobao, 发布日期: 2014-06-26 09:38:46, 浏览数: 1616

 <link rel="stylesheet" href="../themes/default/default.css" />
<link rel="stylesheet" href="../plugins/code/prettify.css" />

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

<script charset="utf-8" src="../lang/zh_CN.js"></script>
<script charset="utf-8" src="../plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.create('textarea[name="bookcontent"]', {
cssPath : '../plugins/code/prettify.css',
uploadJson : '../asp/upload_json.asp',
fileManagerJson : '../asp/file_manager_json.asp',
allowFileManager : true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=myform]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=myform]')[0].submit();
});
}
});
prettyPrint();
});
function validate($id){
        editor1.sync();  
         document.forms['myForm'].submit(); 
 }

</script>

<form name="myform" method="post" action="saveaddproduct.asp?action=add" OnSubmit="return checkkk()" >

<textarea id="bookcontent" name="bookcontent" cols="100" rows="8" style="width:600px;height:400px;visibility:hidden;"></textarea>

<input type="submit" name="button" value="提交保存"  > 
            
            <input  name="bookcontent" type="hidden" size="30">
              <input onClick="ClearReset()" type=reset name="Clear" value="重新填写">
<form>

<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
     if(checkspace(document.myform.bookname.value)) {
document.myform.bookname.focus();
    alert("请输入商品名称!");
return false;
  }
  
  if(checkspace(document.myform.bookcontent.value)) {
document.myform.content.focus();
    alert("请输入商品介绍!");
return false;
  }
  
     if(checkspace(document.myform.shichangjia.value)) {
document.myform.shichangjia.focus();
    alert("请输入套餐价格!");
return false;
  }
     if(checkspace(document.myform.huiyuanjia.value)) {
document.myform.huiyuanjia.focus();
    alert("请输入会员价格!");
return false;
  }
     if(checkspace(document.myform.vipjia.value)) {
document.myform.vipjia.focus();
    alert("请输入VIP会员价格!");
return false;
  }
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>

发表新帖 发表回复