使用jquery和php简单的CRUD操作? [英] CRUD operation using jquery and php simply?
问题描述
我想使用$ .post(index.php,data,function(){})发送数据。现在我想从表格行中获取数据,点击....带有表头ID(带有关联值;例如我点击了vitori记录的编辑(id = 3,fname = vitori,email = vitori @ yahoo.com) ,job = actor)这个记录如何使用jquery .....
I want to send data using $.post(index.php,data,function(){}). now i want to get data from the table row which clicked.... with table header id( with associate value; for example i clicked on edit of vitori record(id=3,fname=vitori,email=vitori@yahoo.com,job=actor) how this record can i get using jquery.....
< html> < head>
< meta charset =utf-8/>
< script src =jquery-2.1.1.js>< ; / script>
< style>
.crud {
border:1px;
}
< / style>
< script>
$(document).ready(function(){
$(。crud a)。click(function(){
alert($(this).parent.parent [0] + $(this).parent.parent [1] + $ (这).parent.parent [2]);
})
});
< / scri pt>
< / head>
< body>
使用Jquery和PHP的简单CRUD
用户ID: | 全名: | 电子邮件: | 工作: | |||
---|---|---|---|---|---|---|
1 | Anjleena Juli | Anjleena @ yahoo .com | 演员 | 查看 | 修改 | 删除 |
2 | 先生。债券 | bond@yahoo.com | 演员 | 查看 | 编辑 | 删除 |
3 | vitori | vitori@yahoo.com | 演员 | 查看 | 修改 | 删除 |
< / body>
< / html>
<html><head>
<meta charset="utf-8" />
<script src="jquery-2.1.1.js"></script>
<style>
.crud{
border: 1px;
}
</style>
<script>
$(document).ready(function(){
$(".crud a").click(function(){
alert($(this).parent.parent[0]+$(this).parent.parent[1]+$(this).parent.parent[2]);
})
});
</script>
</head>
<body>
Simple CRUD Using Jquery And PHP
User Id: | Full Name: | E-mail: | Job: | |||
---|---|---|---|---|---|---|
1 | Anjleena Juli | Anjleena@yahoo.com | Actor | View | Edit | Delete |
2 | Mr. Bond | bond@yahoo.com | Actor | View | Edit | Delete |
3 | vitori | vitori@yahoo.com | Actor | View | Edit | Delete |
</body>
</html>
推荐答案
.post(index.php,data,function(){ })。现在我想从表格行中获取数据,点击....带有表头ID(带有关联值;例如我点击了vitori记录的编辑(id = 3,fname = vitori,email = vitori @ yahoo.com) ,job = actor)这个记录如何使用jquery .....
.post(index.php,data,function(){}). now i want to get data from the table row which clicked.... with table header id( with associate value; for example i clicked on edit of vitori record(id=3,fname=vitori,email=vitori@yahoo.com,job=actor) how this record can i get using jquery.....
< html> < head>
< meta charset =utf-8/>
< script src =jquery-2.1.1.js>< ; / script>
< style>
.crud {
border:1px;
}
< / style>
< script>
<html><head>
<meta charset="utf-8" />
<script src="jquery-2.1.1.js"></script>
<style>
.crud{
border: 1px;
}
</style>
<script>
(document).ready(function(){
(document).ready(function(){
(。crud a)。点击(function(){
alert(
(".crud a").click(function(){
alert(
这篇关于使用jquery和php简单的CRUD操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!