Home > Web Front-end > JS Tutorial > body text

Dynamic addition, deletion, modification and query of table information based on jQuery, with left/right click prompts (original from Zjmainstay)_jquery

WBOY
Release: 2016-05-16 17:51:21
Original
1481 people have browsed it

Online demo: http://demo.jb51.net/js/2012/jqueryAutoAddDeleteTableTr/jqueryAutoAddDeleteTableTr_leftClick.html
//Left click

Copy the code The code is as follows:



jQuery 动态增删表格















































































               
              1
              2
              3
              4
              5
              6



向上增加一行
修改当前一行
向下增加一行
删除当前行




jqueryAutoAddDeleteTableTr_rightClick.html
//右键(含屏蔽浏览器右键功能)
复制代码 代码如下:



jQuery 动态增删表格















































































               
              1
              2
              3
              4
              5
              6



向上增加一行
修改当前一行
向下增加一行
删除当前行




jqueryAutoAddDeleteTableTr_leftClick_addsearch.html
//左键添加查询功能
复制代码 代码如下:



jQuery 动态增删表格



























































































               
1 2 3 4 5 6 7 8
a b c d e f g h
A B C D E F G H
aa bb cc dd ee ff gg hh
111 222 333 444 555 666 777 888
1a 2b 3c 4d 5e 6f 7g 8h



向上增加一行
修改当前一行
向下增加一行
删除当前行




PS:
var addToTrTop = 10;
var addToTrLeft = 534;

var addToTdLeft = 60; //If addToTdLeft is set, addToTrLeft will be invalid

indicates prompt DIV clickTips The offset from the top and left of the current tr can be modified by yourself. It can be a negative number to move up or to the left.

Software download: Download
Author: Zjmainstay  
Source: http://www.cnblogs.com/Zjmainstay/
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!