hi all, i have to acces the id of textarea in javasript.Please tell me how we can access the id of the textarea in javascript.
Shortened: `alert("urtextboxId")` ;)
deceze
2010-04-20 05:56:07
+1
A:
If you want to access ids of all textarea in your document you can use this
var txtAreas = document.getElementsByTagName("textarea");
var len = txtAreas.length;
var ids = new Array();
for(i=0; i<len; i++)
{
ids.push(txtAreas[i].id);
}
rahul
2010-04-20 05:57:14