Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

felipedrumond

Todos Elements de um element!

Recommended Posts

Olá pessoal, alguém poderia me dizer como eu poderia listar todos os objetos que estiverem dentro de uma tabela, por exemplo?

 

Sendo uma tabela, eu gostaria de listar ou pegar todos os objetos ([object]) qualquer que seja ele. Seja table, tr, td, input, select, label, etc.

 

Vlw... http://forum.imasters.com.br/public/style_emoticons/default/joia.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

seguinte a referencia é essa:all Collection--------------------------------------------------------------------------------Returns a reference to the collection of elements contained by the object.Syntax[ collAll = ] object.all [ oObject = ] object.all(vIndex [, iSubIndex]) Possible ValuescollAll - Array of elements contained by the object. oObject - Reference to an individual item in the array of elements contained by the object. vIndex - Required. Integer or string that specifies the element or collection to retrieve. If this parameter is an integer, the method returns the element in the collection at the given position, where the first element has value 0, the second has 1, and so on. If this parameter is a string and there is more than one element with the name or id property equal to the string, the method returns a collection of matching elements. iSubIndex - Optional. Position of an element to retrieve. This parameter is used when vIndex is a string. The method uses the string to construct a collection of all elements that have a name or id property equal to the string, and then retrieves from this collection the element at the position specified by iSubIndex. ai fica assim você tem uma tabela q tem q ter um id ai você faz:var arrayOfElements = tableid.all;então assim você terá todos os elementos q estão dentro da tabela.isso serve para qualquer coisa. mas isso só retorna os onjetos html ñ o conteudo deles ai para isso tem q utilizar o innerHTML ou innerText.acredito q é isso.the void

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.