我想用控件 的 事件 来制定 kindeditor 绑定的文本框的 id代码是这样的 <script src="kindeditor/kindeditor.js" type="text/javascript"></script>
<script type="text/javascript">
function KEShow(cid){
alert(cid.toString());
KE.show({
id : cid.toString(),
imageUploadJson : '../asp.net/upload_json.ashx',
fileManagerJson : '../asp.net/file_manager_json.ashx',
allowFileManager : true,
newlineTag : 'br',
afterCreate : function(id) {
KE.event.ctrl(document, 13, function() {
KE.util.setData(id);
document.forms['form1'].submit();
});
KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
KE.util.setData(id);
document.forms['form1'].submit();
});
}
});
}
</script> <style type="text/css">
</style>
</head>
<body>
<form id="form1" runat="server">
<textarea id="content1" name="content1" style="width:700px;height:300px;visibility:hidden;" cols="20" rows="10" >
<asp:Literal ID="ltcontent" runat="server"></asp:Literal>
</textarea>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="KEShow('content1)"/>
但是单击按钮不出效果 求助 !
<script type="text/javascript">
function KEShow(cid){
alert(cid.toString());
KE.show({
id : cid.toString(),
imageUploadJson : '../asp.net/upload_json.ashx',
fileManagerJson : '../asp.net/file_manager_json.ashx',
allowFileManager : true,
newlineTag : 'br',
afterCreate : function(id) {
KE.event.ctrl(document, 13, function() {
KE.util.setData(id);
document.forms['form1'].submit();
});
KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
KE.util.setData(id);
document.forms['form1'].submit();
});
}
});
}
</script> <style type="text/css">
</style>
</head>
<body>
<form id="form1" runat="server">
<textarea id="content1" name="content1" style="width:700px;height:300px;visibility:hidden;" cols="20" rows="10" >
<asp:Literal ID="ltcontent" runat="server"></asp:Literal>
</textarea>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="KEShow('content1)"/>
但是单击按钮不出效果 求助 !
解决方案 »
- DataList1_ItemCommand不执行
- 求一正则表达式:用户名的填写规则
- 高分!实在搞不定了,各位高手都进来看一看啊,顶者有分
- 发现一个TreeView控件的bug,不知道大家是不是也是这样的。
- datagird筛选后,翻页,绑定的问题!
- infragistics的ultrawebgrid中设置分页后,为何中间多了一页相同页
- 如何在datagrid中没有数据时,再在下方添加一行显示该页无法显示
- 点击删除时如何弹出确认框?
- 如何反序列化化以下字符串
- 如何验证用户输入的数据为数字?
- 关于一个options.add(new Option(text,value))的问题
- 求个 asp.net 验证码
给textarea加runat属性,就能象操作服务器控件一样操作它了;
用javascript获得id :<%=content1.ClientID%><textarea runat="server" id="content1" name="content1" style="width:700px;height:300px;visibility:hidden;" cols="20" rows="10" >
</textarea>