在asp.net中找到输入(文本)的ID [英] find id of input(text) in asp.net
本文介绍了在asp.net中找到输入(文本)的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在asp.net中查找输入(文本)的ID.
find id of input(text) in asp.net
推荐答案
,如果您想从其文本中找到输入控件的ID,请尝试此javascript函数. ..
if you want to find id of input control from text of it.. try this javascript function..
function getID()
{
var coltrols = document.getElementByTagName('input');
var id="";
for(var i=0;i<controls.length;i++)
{
if(controls[i].value == 'your value')
{
id=controls[i].name;
break;
}
}
return id;
}
希望对您有所帮助.
hope it helps..
这篇关于在asp.net中找到输入(文本)的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文