Сообщение от pods
|
к узнать атрибут name у всех объектов ?
|
Как вариант...
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
</style>
<script type="text/javascript">
function Go() {
var o=document.body.getElementsByTagName('*')
for (var i=0; i<o.length; i++)
alert(o[i].getAttribute("name"))
}
</script>
</head>
<body onload='Go()'>
<input name='n1' />
<div name='n2'></div>
</body>
</html>