post的用法html,使用post方法从后端的html访问输入标记值

嗨,伙计们,我不熟悉html和javascript。我的应用程序是从一个来自后端的列表列表中创建一个表,在动态创建它们之后(由于列表的长度未知),我需要在python后端访问表的某些特定值,当我尝试这样做时,我能够在后端获取值,但该值不是所需的值。它返回的值是该表的最后一个元素。在

下面是我的代码{% for result in list1 %}

{{result.0}}

{{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按钮时,我需要获得该行的客户机名称和候选名称

请帮我拿这个

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值