开发者

i get two buttons in html doc

For some reason in this code snippet I get two post buttons one after past exam radio button and the other at very bottom. Also after I check the radio button and refresh the page the buttons appear still che开发者_开发问答cked. I don't know what is wrong.

<html>
<head>
<script type="text/javascript">
$(document).ready( function(){
 $('#materialupdate li').click(function(){
 switch($(this).attr('id')){
case "matup":
 $('#mf').show();
              break;
              }
           });
    }); 
    </script>
</head>
<body>
<div>
            <ul id="materialupdate" >
                <li id="matup">Material </li>

            </ul>
          </div>
<div id="mf">
                <form>
                    <div>
                    <label>Upload material:</label><input type="radio" name"material" id="up" value="" />
                    <label>Request material:</label>    <input type="radio" name"material" id="rm" value=""/>
                    </div>


                    <div>
                    <input type="radio" name="notes" class="matclass" value="" /><label>Notes</label><br/>



                    <input type="radio" name="handout" class="matclass" value="" /><label>Hand outs</label><br/>



                    <input type="radio" name="pastexams" class="matclass" value="" /><label>Past Exams</label><br/>
                    </div>

                    <table>
                        <tr id="subj">
                        <td><label>Subject:</label></td>  <td><input type="text" name="subject" id="sub" /></td>
                        </tr>


                    <tr id="top">
                        <td><label>Topic:</label></td>  <td><input type="text" name="topic" id="tpc" /></td>

                    </tr>

                    <tr id="prff"><div>
                        <td><label>Proff:</label> </td>  <td><input type="text" name="proff" id="prof" /></td>
                    </div>
                    </tr>
                    <tr> <button id="post" class="post">post</button></tr>

                    </table>
                    <div><label>Description</label></div>
                    <div><textarea rows="3" cols="40"> </textarea></div>

                </form>
                 <button id="post" class="post">post</button>
            </div>


You have two post buttons in the markup.

                <tr> <button id="post" class="post">post</button></tr>

                </table>
                <div><label>Description</label></div>
                <div><textarea rows="3" cols="40"> </textarea></div>

            </form>
             <button id="post" class="post">post</button>


Your button:

<button id="post" class="post">post</button>

is repeated twice in the markup posted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜