将 HTML 跳转菜单更改为 PHP
这是我的 HTML 代码:
<FORM NAME="jumpform">
<SELECT NAME="pages" onChange = "window.status = this.options[this.selectedIndex].text">
<OPTION SELECTED VALUE="tutorial_part1.html">1 of 7
<OPTION VALUE="tutorial_part2.html">2 of 7
<OPTION VALUE="tutorial_part3.html">3 of 7
<OPTION VALUE="tutorial_part7_frames.html">4 of 7
<OPTION VALUE="tutorial_part8.html">5 of 7
<OPTION VALUE="tutorial_part9.html">6 of 7
<OPTION VALUE="tutorial_part10_frames.html">7 of 7
</SELECT>
<INPUT VALUE="Go" TYPE=BUTTON onClick = "jump (document.jumpform.pages.options[pages.selectedIndex].value)">
</FORM>
当我使用 PHP 向页面添加页眉和页脚时,跳转菜单不起作用。当您选择它们时,选项会发生变化,但当您单击“开始”时,不会发生任何情况。我怎样才能重写这个,以便当我将 php 代码添加到页面时,并且当我将文件扩展名更改为 .php 时,跳转表单仍然有效?
谢谢。
Here is the code I have in HTML:
<FORM NAME="jumpform">
<SELECT NAME="pages" onChange = "window.status = this.options[this.selectedIndex].text">
<OPTION SELECTED VALUE="tutorial_part1.html">1 of 7
<OPTION VALUE="tutorial_part2.html">2 of 7
<OPTION VALUE="tutorial_part3.html">3 of 7
<OPTION VALUE="tutorial_part7_frames.html">4 of 7
<OPTION VALUE="tutorial_part8.html">5 of 7
<OPTION VALUE="tutorial_part9.html">6 of 7
<OPTION VALUE="tutorial_part10_frames.html">7 of 7
</SELECT>
<INPUT VALUE="Go" TYPE=BUTTON onClick = "jump (document.jumpform.pages.options[pages.selectedIndex].value)">
</FORM>
When I use PHP to add a header and a footer to the page, the jump menu doesn't work. the options change when you select them, but nothing happens when you click "Go". How can I rewrite this so that when I add php code to the page, and when I change the file extensions to .php, the jumpform still works?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
例如,在表单之前和表单之后关闭 php 标签
就应该是这样。
close php tags before form, and after the form for example
that should be it.