0

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 only

1 Answer 1

1

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;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.