Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/475.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将特定的表id获取到javascript?_Javascript_Jquery_Ajax_Inline - Fatal编程技术网

如何将特定的表id获取到javascript?

如何将特定的表id获取到javascript?,javascript,jquery,ajax,inline,Javascript,Jquery,Ajax,Inline,我有很多行数据。每行有3个单元格-id、eesnimi、perenimi。我希望能够内联编辑所有单元格。我正在使用 如何将特定的单元格(我目前正在编辑的单元格)id转换为javascript(element\u id字段),以便我知道在mysql中更改哪个元素 Javascript: $(document).ready(function(){ $(".editme1").editInPlace({ url: 'http://localhost/petka/kast.php

我有很多行数据。每行有3个单元格-id、eesnimi、perenimi。我希望能够内联编辑所有单元格。我正在使用

如何将特定的单元格(我目前正在编辑的单元格)
id
转换为javascript(element\u id字段),以便我知道在mysql中更改哪个元素

Javascript:

$(document).ready(function(){
    $(".editme1").editInPlace({
        url: 'http://localhost/petka/kast.php',
        element_id: ??????,
        show_buttons: true
    });
});
HTML:


你用过吗

 $(this).attr('id');
你用过吗

 $(this).attr('id');
试一试

试一试


顺便提一下,
mysql.*
函数已被弃用,并且容易受到注入攻击。另一方面,
mysql.*
函数已被弃用,并且容易受到注入攻击。改用。
$(document).ready(function(){
  $(".editme1").editInPlace({
  url: 'http://localhost/petka/kast.php',
  element_id: $(this).attr("id"),
  show_buttons: true
 });
});