javascript函数调用html控件 [英] javascript function call inside a html control
问题描述
我正在创建一个javascript函数...
AutoSuggestBox(SearchInputID,MultiSelectID,fnSearch)
这里SearchInputID是文本框控件的ID,MultiSelectID是另一个控件的ID我需要显示我的结果...
现在我试图在文本框控件的onkeyup事件中调用此函数...
所以我的问题是通过文本框控件ID我可以写这个。 id但是如何在该函数调用中给出另一个控件的id。
ex:
< input type =" text" ID = QUOT; SEARCHTEXT"类= QUOT;自动输入" onkeyup =" AutoSuggest.CreateResults(this.id, select control id ,fnFound);" />我应该如何在带下划线的地方提供另一个控件的id ????????????????????????????????????????????????????????????????????????????????
< font style ="color:blue">< 输入 type = " text" id = " SearchText" class = " AutoInput" onkeyup = " AutoSuggest.CreateResults('SrchTxt',select control id,fnFound);" /> |
< 输入 type = "文本&q uot; id = " SrchTxt" class = " AutoInput" /> |
hi ,
I am creating a javascript function...
AutoSuggestBox(SearchInputID, MultiSelectID, fnSearch)
here SearchInputID is the ID of a textbox control and MultiSelectID is ID of another control where i need to show my result...
now i m trying to call this function at onkeyup event of the textbox contol...
so my ques is to pass textbox control id i can write this.id but how to give the id of another control inside that function call..
for ex:
<input type="text" id="SearchText" class="AutoInput" onkeyup="AutoSuggest.CreateResults(this.id,select control id, fnFound);" />
how should i provide the id of another control at the underlined place???????
you should know it
for instance
<input type="text" id="SearchText" class="AutoInput" onkeyup="AutoSuggest.CreateResults('SrchTxt',select control id, fnFound);" /> <input type="text" id="SrchTxt" class="AutoInput"/>
这篇关于javascript函数调用html控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文