使用javascript设置字段 [英] Using javascript to set a field
本文介绍了使用javascript设置字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用客户端JScript来设置字段,但是我无法这样做。有人可以查看编码吗?
< script type =" text / javascript">
function setRole(){
如果(ctx.CurrentItem [" loggedonuser"]值= QUOT; I:0#.W | mickey.mouse"){
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP; //将IMORole设置为是 ctx.CurrentItem [" IMORole"]。value =" Yes"; }
&NBSP;&NBSP;&NBSP; }
< / script>
Lee
解决方案
你想要吗?基于列表形式的另一个字段数据设置字段值?
如果是这种情况,我们可以使用jQuery来实现它。
< script src =" https://code.jquery.com/jquery-1.12.4.min.js"类型= QUOT;文本/ JavaScript的">< /脚本>
< script type =" text / javascript">
(function(){
var loggedonuser =
("输入[名^ = 'loggedonuser'] [名称
I am trying to use client side JScript to set a field, however I am not able to do so. Can someone look at the coding?
<script type="text/javascript">
function setRole() {
if (ctx.CurrentItem["loggedonuser"].value = "i:0#.w|mickey.mouse") {
// Setting the IMORole to Yes
ctx.CurrentItem["IMORole"].value = "Yes";
}
}
</script>
Lee
解决方案
Hi,
Do you want to set a field value base on another field data in list form?
If that is the case, we can use jQuery to achieve it.
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script> <script type="text/javascript">
(function(){ var loggedonuser=
("input[name^='loggedonuser'][name
这篇关于使用javascript设置字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文