Should be simple, right?
All you want to do is add multiple lines of HTML using JQuery without having to squish everything into one line. So you try something like this:
$("body").append("
AprOfficeA
3-12-14 12:12
19384
3-12-14 to 3-29-14
")
这样肯定是不行的!
The problem of course is that you need to add a “/”to the end of every line and change all attribute double-quotes to single-quotes or else you’ll see jack. And doing all that will make you want to kill yourself.
So what to do?
Here’s a sweet solution: 解决方法:
AprOfficeA
3-12-14 12:12
19384
3-12-14 to 3-29-14
$('#body').append( $("#batchInsert").html() );
相关
Related Posts
jQuery: 合并表格中相同文本的相邻单元格
一、效果 二、代码
Example…jQuery: 选择器(DOM,name,属性,元素)
出处:http://www.cnblogs.com/starof/p/5411457.html 大部分选择器都是基于下面这个简单的页面:
…使用jQuery和Pure.CSS创建一个可编辑的表格
使用开源组件真的可以容易又快速地为网站和app构建强大的前端元素。在本教程中,我会告诉你如何使用PureCSS和jQuery轻松地创建可编辑的表格。 如果想看教程演示的话,请点击这里查看。 开始 你要做的第一件事情是,在你的服务器或本地硬盘上创建一个index.html文件。粘贴以下基本代码到新创建的文档中,然后保存。
…