gpt4 book ai didi

jQuery 文本编辑器不起作用?

转载 作者:太空宇宙 更新时间:2023-11-04 14:40:05 28 4
gpt4 key购买 nike

所以我正在尝试将 jQuery TextEditor 安装到我的 CodeIgniter 元素中。我想知道为什么它不起作用。顺便说一句:我的元素也使用 Bootstrap。谁能告诉我为什么插件不起作用?我已经将文件放在正确的位置,所以我不认为这是因为浏览器找不到我的文件。请帮忙。

头:

<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php echo base_url()?>css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="<?php echo base_url()?>css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css">
<link href="<?php echo base_url()?>css/custom-style.css" rel="stylesheet" type="text/css">

<link type="text/css" rel="stylesheet" href="<?php echo base_url()?>css/jquery-te-1.4.0.css">

<script type="text/javascript" src="http://code.jquery.com/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery-te-1.4.0.min.js" charset="utf-8"></script>


<style>
.input-mysize{
width:700px;
}

.textarea-mysize{
width:700px;
height:300px;
}
</style>

</head>

我的文本区:

<form method="post" action="#">
<table border="0" width="100%">
<tr align="center">
<th><input class="input-mysize" type="text" name="c_title" cols="100"/></th>
</tr>
<tr align="center">
<td><textarea name="textarea" class="jqte-test"></textarea></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="Update Content"/>
<input type="reset" value="reset"/>
</td>
</tr>
</table>
</form>

Textarea 中的类称为“Jqte-test”,因为它是 jQueryTE 演示页面上的内容。我真的不明白他们是如何让它发挥作用的,而我却做不到。非常感谢所有答案。

最佳答案

我看到您没有使用 jQuery 插件初始化文本区域 .jQte-test

$(document).ready();你需要添加$(".jqte-test").jqte();

<script>
$(document).ready(function(){
$(".jqte-test").jqte();
});
</script>

查看插件的文档以获得实现技巧

http://jqueryte.com/documentation

关于jQuery 文本编辑器不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18417982/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com