html输入字段问题

时间:2011-08-25 20:56:46

标签: html css stylesheet

我是html的新手,这可能是一个愚蠢的错误,但我无法发现它。每当我选择一个输入字段时,光标总是跳转到第一个输入框。我猜我在某个地方错过了一个结局陈述,但我无法发现它......

<form method = "POST" action="changeCourse.php";>

<label for="newModule">Module:<label>
<input type="text" name="newModule" input value = "<?php echo $_REQUEST['modules'];?>"/>

<label for="newCode">Code:</label>
<input type="text" name="newCode" input value = "<?php echo $_REQUEST['codes'];?>"/>

<label for="newLesson">Lesson Type</label>
<select name="newLesson" id="newLesson">
                    <OPTION SELECTED><?php echo $_REQUEST['lesson_types'];?></option>
                    <option label="newLesson">Lecture</option>
                    <option label="newLesson">Tutorial</option>
</select>

<label for="newCredit">Credit:</label>
<input type="text" name="newCredit" input value = "<?php echo $_REQUEST['credits'];?>"/>


<label for="newLevel">Level</label>
<select name="newLevel" id="newLevel">
                    <OPTION SELECTED><?php echo $_REQUEST['levels'];?></option>
                    <option label="newLevel">4</option>
                    <option label="newLevel">5</option>
                    <option label="newLevel">6</option>
</select>

<label for="newCore">Core:</label>
<input type="text" name="newCore" input value = "<?php echo $_REQUEST['cores'];?>"/>

<label for="newLab">Lab Number:</label>
<input type="text" name="newLab" input value = "<?php echo $_REQUEST['labs'];?>"/>

<label for="facilities">Lab Facilities</label>
                  <select name="facilities" id="day">
                    <OPTION SELECTED><?php echo $_REQUEST['facilities'];?></option>>
                    <option label="facilities">Full(MS Office, Programming Packages, Adobe Packages)</option>
                    <option label="facilities">Partial(MS Office, Adobe Packages)</option>
                    <option label="facilities">Simple(MS Office)</option>
</select>

<label for="newTeacher">Teacher:</label>
<input type="text" name="newTeachers" input value = "<?php echo $_REQUEST['teachers'];?>"/>

<label for="newDay">Day</label>
                  <select name="newDay" id="day">
                    <OPTION SELECTED><?php echo $_REQUEST['days'];?></option>
                    <option label="newDay">Monday</option>
                    <option label="newDay">Tuesday</option>
                    <option label="newDay">Wednesday</option>
                    <option label="newDay">Thursday</option>
                    <option label="newDay">Friday</option>
</select>

<label for="newTime">Time:</label>
<input type="text" name="newTime" input value = "<?php echo $_REQUEST['times'];?>"/>


<label for="newComment">Additional Comments:</label>
<textarea style="resize: none;" cols="30" rows="3" name="newComment"> hello </textarea>

<input type="submit" value="Update Record" />
<input type="hidden" name="id" value="<?php echo $_REQUEST['ids'];?>">
</form>

2 个答案:

答案 0 :(得分:0)

不确定这是否是原因,但你有一堆input value个,并且只应value删除input

答案 1 :(得分:0)

首先,您应该修复HTML。在浏览器中打开您的页面,显示HTML源代码并将其作为直接输入复制并粘贴到HTML validator。修复所有提到的问题,然后重试。

修复HTML后,您是否还有问题?