<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Deleting Selected Nodes</title>
    <script type="text/javascript" language="Javascript" src="script03.js">
    </script>
</head>
<body>
<form action="ccc" name="fff">
    <p><textarea id="textArea" rows="5" cols="30"></textarea></p>
    <p><label><input type="radio" name="nodeAction" />Add node</label>
    <label><input type="radio" name="nodeAction" />Delete node</label></p>
    Paragraph #: <select id="grafCount"></select>
    <input type="submit" value="Submit" />
</form>
<form action="bbb" name="fff">
    <p><textarea id="textArea" rows="5" cols="30"></textarea></p>
    <p><label><input type="radio" name="nodeAction" />Add node</label>
    <label><input type="radio" name="nodeAction" />Delete node</label></p>
    Paragraph #: <select id="grafCount"></select>
    <input type="submit" value="Submit" />
</form>
<div id="modifiable"> </div>
<script language="javascript" type="text/javascript">alert(document.forms[0].action)
alert(document.getElementsByTagName("form")[0].action)
alert(document.getElementsByName("fff")[0].action)
</script>
</body>
</html>

解决方案 »

  1.   

    谢谢mingxuan3000 的用心!明白document.forms[0].xxx就是取得了属性为xxx的值,
    但这个不明白:document.getElementsByTagName("form")[0]近回第一个form,同时也是关联数组(里面存储了个form里的信息)吗? 
      

  2.   

    ocument.getElementsByTagName("form")[0].ids这里取出的是name为ids的值果要取出iddocument.getElementById("ids").valueone html  only one  id
      

  3.   

    document.getElementsByTagName("form")[0] 
    里面存储了form的信息