嗨,伙计们,我不熟悉html和javascript。我的应用程序是从一个来自后端的列表列表中创建一个表,在动态创建它们之后(由于列表的长度未知),我需要在python后端访问表的某些特定值,当我尝试这样做时,我能够在后端获取值,但该值不是所需的值。它返回的值是该表的最后一个元素。在
下面是我的代码{% for result in list1 %}
{{result.1}}
{% if result.1 == "HR_Interview" %}
COL
{% elif result.1 == "Internal_Interview" %}
HR_Interview
COL
{% elif result.1 == "COL" %}
CS
{% elif result.1 == "CI" %}
CIS
{% elif result.1 == "CIS" %}
Joining
{% elif result.1 == "CS" %}
CI
{% elif result.1 == "Line_up" %}
Internal_Interview
HR_Interview
COL
{% endif %}
{{result.2}}{{result.3}}
{{result.4}}
{{result.5}}{{result.6}}{{result.7}}{{result.8}}{{result.9}}{{result.10}}{{result.11}}{{result.12}}{{result.13}}{{result.14}}{{result.15}}{{result.16}}{{result.17}}function function9(x)
{
var id = $(x).closest("tr").find('td:eq(1)').find("#status8 option:selected").text();
var Client18 = $(x).closest("tr").find('td:eq(3)').text();
var name18 = $(x).closest("tr").find('td:eq(4)').text();
console.log("fetched value>>>",id,Client18,name18);
if (id == "COL")
{
var r=confirm("Do you want to generate COL NOW ?");
if (r == true)
{
alert("before");
document.getElementById("listOfSearch{{result.0}}").action ="/hrpage/";
document.getElementById("listOfSearch{{result.0}}").method = 'POST';
document.getElementById("listOfSearch{{result.0}}").submit();
alert("after");
}
else
{
document.getElementById("listOfSearch{{result.0}}").submit();
}
}
else
{
document.getElementById("listOfSearch{{result.0}}").submit();
}
}
这是一个django应用程序
我的应用程序是当我按下每一行中形成的save按钮时,我需要获得该行的客户机名称和候选名称
请帮我拿这个