JavaScript代码无法正常工作

编程入门 行业动态 更新时间:2024-10-14 16:22:00
本文介绍了JavaScript代码无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我可以在特定条件下创建动态控件... 我在嵌入javascript时传递了控件clientid,但是它无法正常工作,这对我有帮助吗?

i m creating a dynamic control on particular condition... i m passing the control clientid when embedding with javascript but its not working fine can any help me out here is my code

DropDownList1.Attributes.Add("onChange", "getDropDownListvalue(" + this.DropDownList1.ClientID + "," + this.Label1.ClientID + ")");

function getDropDownListvalue(dropdown,label) { var IndexValue = document.getElementById(dropdown); var label= document.getElementById(label); }

推荐答案

尝试以下操作: Try this: DropDownList1.Attributes.Add("onChange", "getDropDownListvalue(''" + this.DropDownList1.ClientID + "'',''" + this.Label1.ClientID + "'')");

更多推荐

JavaScript代码无法正常工作

本文发布于:2023-11-07 23:23:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567713.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法正常   代码   工作   JavaScript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!