小编Aki*_*imi的帖子

PHP:单词中的快速数字

是否有一个函数可以用单词表示任何给定的数字?

例如:

如果是数字1432,那么这个函数将返回"一千四百三十二".

php numbers words

41
推荐指数
4
解决办法
7万
查看次数

TinyMCE textarea和使用ajax发布表单

我通过AJAX将tinyMCE用于textareas和POSTing表单.

但是当我尝试保存textarea值时,它会在第一次单击时使用旧值,但它会在第二次单击时获取更新值.

我尝试过使用tinyMCE.triggerSave()但它没有用.

我也尝试过tinyMCE.get('myid').getContent(),它仍然需要旧的价值观.

我的代码如下.

    $(".submit").live("click", function () {
            tinyMCE.triggerSave();
            var f = $(this).parents("form");
            var action = f.attr("action");
            var serializedForm = f.serialize();
            //tinyMCE.triggerSave(); also tried putting here
            $.ajax({
                 type: 'POST',
                 url: action,
                 data: serializedForm,
                 async: false,
                 success: function (data, textStatus, request) {
                     $(".divform").html(data);
                 },
                 error: function (req, status, error) {
                     alert&("Error occurred!");
                 }
            });
    return false;
    });
Run Code Online (Sandbox Code Playgroud)

请帮助,任何帮助将不胜感激

ajax tinymce save

13
推荐指数
3
解决办法
3万
查看次数

如何使用jQuery DataTables从所有页面提交复选框

我正在尝试td为每一行获取第一个cell()并获取它但仅针对当前页面.如果我导航到下一页,则不会发送上一页上选中的复选框.

<table class="table" id="example2">
    <thead><tr>

            <th>Roll no</th><th>Name</th></tr><thead>
        <?php
        $sel = "SELECT * FROM `st`";
        $r = mysqli_query($dbc, $sel);
        while ($fet = mysqli_fetch_array($r)) {
            ?>
            <tr>
                <td><?php echo $fet['trk'] ?></td>
                <td><input type="text" value="<?php echo $fet['ma'] ?>" id="man" class="form-control"></td>
                <td><input type="checkbox" id="check" name="myCheckbox" class="theClass"></td></tr>
        <?php } ?>


</table>

<input type="submit" id="sub_marks" class="btn btn-info" value="Submit & Continue">

<script src="plugins/datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $('#example2').DataTable({
            "paging": true,
            "lengthChange": false,
            "searching": false,
            "ordering": true,
            "info": true,
            "autoWidth": false, …
Run Code Online (Sandbox Code Playgroud)

javascript php ajax jquery datatables

12
推荐指数
1
解决办法
1万
查看次数

使用纯CodeIgniter创建RESTful API?

我需要仅使用CodeIgniter创建RESTful web api.我不能使用任何第三方插件或库来执行此操作.我见过大多数人都在使用https://github.com/chriskacerguis/codeigniter-restserver.请指导我仅使用CodeIgniter编写REST API.有用的链接和步骤非常感谢.

提前致谢.

php rest codeigniter

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

php ×3

ajax ×2

codeigniter ×1

datatables ×1

javascript ×1

jquery ×1

numbers ×1

rest ×1

save ×1

tinymce ×1

words ×1