gpt4 book ai didi

javascript - 使用 jQuery 设置 SharePoint 中隐藏字段的值

转载 作者:行者123 更新时间:2023-12-02 17:05:19 24 4
gpt4 key购买 nike

我可以使用 jQuery 设置站点列(字段)的值(当它未使用此隐藏时):

    $("select[Title='MyID']").val(MyRelatedID);

但是,一旦我隐藏该字段,它就不起作用了。我检查了代码,看起来 SharePoint 也将其从源代码中隐藏了。我正在打开包含模式中字段的列表。有人可以设置字段的隐藏值吗?

最佳答案

我通常使用这种方法:

设置值:

$('input[title="MyID"]').attr("value",MyRelatedID);

隐藏字段:

$('input[title="MyID"]').parent().parent().parent().css("display","none");

我记录了完整的方法here .

关于javascript - 使用 jQuery 设置 SharePoint 中隐藏字段的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25294265/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com