Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html ';href=';不在项目中工作_Html_Forms_Href - Fatal编程技术网

Html ';href=';不在项目中工作

Html ';href=';不在项目中工作,html,forms,href,Html,Forms,Href,href=“link here”不适合我。i、 e单击“更新”按钮不会加载其页面。这是代码的一部分: <div class="st-container"> <input type="radio" name="radio-set" checked="checked" id="st-control-1"/> <a href="home.html">Home</a> <input type="radio" name="rad

href=“link here”不适合我。i、 e单击“更新”按钮不会加载其页面。这是代码的一部分:

<div class="st-container">
    <input type="radio" name="radio-set" checked="checked" id="st-control-1"/>
    <a href="home.html">Home</a>
    <input type="radio" name="radio-set" id="st-control-2" />
    <a href="../update/update.html">Updates</a>
    <input type="radio" name="radio-set" id="st-control-3"/>
    <a href="#">Gallery</a>
    <input type="radio" name="radio-set" id="st-control-4"/>
    <a href="#">Ideals</a>
    <input type="radio" name="radio-set" id="st-control-5"/>
    <a href="#">Support</a>
</div>

澄清一下:这里的问题似乎不是路径不正确或文件不存在

OP希望使用单选按钮进行导航,以便单击
将导航到不同的URI

这可以通过javascript使用
onclick
处理程序来完成。
此处详细介绍了一些变化:



请注意,使用表单元素进行导航可能会对可用性产生不利影响。举个例子:如果用户在其浏览器中禁用了javascript,导航将失败。

您可以通过多种方式来实现这一点

这取决于您想要什么,选择正确的代码将帮助您实现网站功能。

1.您只能使用带有链接的“按钮”(收音机):(有两个 (方法)

1.1-如果页面位于主机上:

Updates

1.2-如果页面位于另一台主机上:

更新
2.您只能使用带有链接的标签:


3.您可以同时拥有链接和带有链接的“按钮”(收音机):


4.您也可以使用按钮(我建议您使用。)

更新
这里有一些您可以添加到的标签信息:


当您单击“更新”链接时会发生什么?它保持在同一页面上。我所说的“链接”是指
——而不是
。您是否希望单击
将导航到URI?如果是这样的话,我在这里没有看到任何代码可以做到这一点。?没有密码?嗯,我以为这样就行了。你有没有一个示例或者我可以看看的东西?如果想要的效果是点击
将导航到另一个页面,那么你需要一些javascript。这可能会有帮助:
<input type="button" value="Page" onclick="location.href='http://example.com';">
<input type="radio" name="radio-set" id="st-control-2" onclick="parent.location='../update/update.html'">Updates</input>
<input type="radio" name="radio-set" id="st-control-2"/>
<a href="../update/update.html"><b>Updates</b></a>
<input type="radio" name="radio-set" id="st-control-2"
onclick="location.href='../update/update.html'"/> <a
href="../update/update.html"><b>Updates</b></a>
<button type="button" id="st-control-2" onclick="location.href='../update/update.html'"><b>Update</b></button>