hash在action=";中的含义是什么#&引用;html表单中的标签

hash在action=";中的含义是什么#&引用;html表单中的标签,html,Html,这对html表单标记中的action=“#”意味着什么。 比如说, <form action="#" method="post" class="demoForm" id="demoForm"> <fieldset> <legend>Demo: Checkboxes Sharing Same Name</legend> <p>Check the types of sports or fitness ac

这对html表单标记中的action=“#”意味着什么。 比如说,

<form action="#" method="post" class="demoForm" id="demoForm">

    <fieldset>
        <legend>Demo: Checkboxes Sharing Same Name</legend>

    <p>Check the types of sports or fitness activities you engage in on a regular basis.</p>

    <p>
        <label><input type="checkbox" name="sports[]" value="cycling" /> cycling</label>
        <label><input type="checkbox" name="sports[]" value="running" /> running</label>
        <label><input type="checkbox" name="sports[]" value="other" /> other</label>
    </p>

    </fieldset>

</form>

演示:共享相同名称的复选框
定期检查你参加的运动或健身活动的类型

骑脚踏车兜风 跑步 其他

“#”将表单操作url提交给自身(表单所在的页面url)。 主要用于虚拟目的和相同的页面表单提交,尽管有更好的技术。 看看这个答案

#
表示没有外部重定向。换句话说,没有链接到另一个单独的页面。如果需要引用,则所有内容应仅在该页面内引用

标记中:
表示单击表单的提交按钮时,不必将收集的数据重定向到任何其他页面

标记中:
表示单击链接时,不要重定向到任何页面。保持一致


因此,简单地说,在web开发(HTML)中,“#”意味着没有链接:

好问题,继续问下去,但是在问之前先要有基本的知识。()