js 上移下移行

function up_tr(sender) {
                            var tr = $(sender).parent().parent();
                            var table = tr.parent();
                            var first = $("tr:first", table);
                            if (tr.html() == first.html()) {
                                alert("已經是第一行了");
                            } else {
                                tr.prev().insertAfter(tr);
                            }
                        }
                        function down_tr(sender) {
                            var tr = $(sender).parent().parent();
                            var table = tr.parent();
                            var last = $("tr:last", table);
                            if (tr.html() == last.html()) {
                                alert("已經是最後一行了");
                            } else {
                                tr.next().insertBefore(tr);
                            }
                        }

js 上移下移行,布布扣,bubuko.com

js 上移下移行

上一篇:《转载》ASP.NET GridView中文本内容无法换行(自动换行/正常换行)


下一篇:JS eval()函数