如果您使用和标签在一个html文件中命名用户的输入,那么如何在另一个html文件中使用它?我只想使用html。没有javascript或任何东西。
主文件:
<HTML>
<HEAD>
<TITLE>
Harry Potter
</TITLE>
</HEAD>
<BODY text = "red" bgcolor = "green">
<CENTER><H1><B><U>Harry Potter</U></B></H1></CENTER>
Please register for HPhmR by <A href = form.html>Clicking Here</A>
</BODY>
</HTML>
Form.html:
<HTML>
<HEAD>
<TITLE>
HPhmR Resgistering
</TITLE>
</HEAD>
<BODY bgcolor = "turquoise">
<FORM action = "harry potter.html" method = "post" name = "HPhmR">
<P>Please enter your username :
<INPUT type = "text" size = "30" name = "username" maxlength = "20">
</P>
<P>Please enter your password :
<INPUT type = "password" size = "30" name = "password" maxlength = "15">
</P>
<P>Please choose your favourite character:<BR>
<SELECT name = "favcha" size = "8" MULTIPLE>
<OPTION value = "Dumbledore">Albus Dumbledore</OPTION>
<OPTION value = "Voldemort">Lord Voldemort</OPTION>
<OPTION value = "Harry">Harry Potter</OPTION>
<OPTION value = "Ron">Ron Weasely</OPTION>
<OPTION value = "Hermione">Hermione Granger</OPTION>
<OPTION value = "Sirius">Sirius Black</OPTION>
<OPTION value = "Bellatrix">Bellatrix Lestrange</OPTION>
<OPTION value = "Draco">Draco Malfoy</OPTION>
</SELECT>
</P>
<P>Select your age range :
<INPUT type = "radio" name = "10-15" value = "1">10 to 15 yrs
<INPUT type = "radio" name = "15-20" value = "2">15 to 20 yrs
<INPUT type = "radio" name = "20-30" value = "3">20 to 30 yrs
<INPUT type = "radio" name = "30-45" value = "4">30 to 45 yrs
<INPUT type = "radio" name = "45-60" value = "5">45 to 60 yrs
<INPUT type = "radio" name = "60+" value = "6">Above 60 yrs
</P>
<INPUT type = "submit" value = "Submit and Register">
</FORM>
</BODY>
</HTML>
如何在form.html中使用用户的输入?我想使用该输入并在主文件中执行其他操作。
答案 0 :(得分:0)
你不能只使用html。但是你可以使用php或asp.net将表单从一个文件发送到另一个文件。