jquery 选择器用变量表示

1、变量id 添加到jquery中

   var User = ["Uno", "Uname", "Usex", "Uid", "Ujob", "Udept", "Unow", "Ucphone", "Ucemail", "Uip", "Uphone", "Uhphone", "Uemail"];

     $("#"+User[i])

注意:# 后面的整体作为一个变量


2、给:eq()添加变量到选择器中

content[i] = $("#testtable tr:eq(" + j + ") td:nth-child(2)").find("input").val();

变量用+号连接


3、一个简单的例子,实现表格中的数据传到对话框中。

<%-- any content can be specified here e.g.: --%>
<%@ page pageEncoding="UTF-8" %>

个人信息

编辑
修改个人信息
姓名:
性别:
身份证号:
职务:
部门:
岗位:
内线电话:
公司邮箱:
IP地址:
个人电话:
住宅电话:
个人邮箱:

你可能感兴趣的:(jquery)