dynamically convert string to HTMLControl in javascript
I am having one id of textbox in form of string & I want to set some value from js. How could I set it
document.formid.getElementByTag("input").getelementId("strTextId").value = dynamicVal
Other cases its HTMLInputObject ref. But here I am having string id only
Please guide me. I wanted to do it in javascript on开发者_C百科ly
If I understand your question correctly (questionable), you want to set the text property of a textbox. If that's correct, here's how you do it:
document.getElementById("strTextId").value = dynamicVal;
精彩评论