HTML URL命名约定

huangapple go评论59阅读模式
英文:

HTML URL Naming Convention

问题

我正在制作一个通用的HTML表单,其中包含一个输入字段,允许用户输入URL的第一部分,然后在显示在网页上时会自动与一个变量连接起来。

<form>
  <input type="text" id="link" value="https://www.example.com/en-US/search?q=">
  <input type="submit" value="Submit">
</form>

网页上显示的链接的HTML代码是:

<a href="https://www.example.com/en-US/search?q=XYZ">Click Here</a>

在这个上下文中,是否有一个简短、正式或常用的名称来指代XYZ之前的URL部分?我指的是:"https://www.example.com/en-US/search?q="。谢谢。

英文:

I'm crafting a generic html form with an input field that allows the user to enter the first part of a URL, that will then automatically be concatenated w/ a variable when displayed on a web page.

&lt;form&gt;
  &lt;input type=&quot;text&quot; id=&quot;link&quot; value=&quot;https://www.example.com/en-US/search?q=&quot;&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
&lt;/form&gt;

The html for the link appearing on the web page is:

&lt;a href=&quot;https://www.example.com/en-US/search?q=XYZ&quot;&gt;Click Here&lt;/a&gt;

In this context: Is there a short, formal or common name used to refer to the part of the URL before the XYZ? I'm referring to: "https://www.example.com/en-US/search?q=". Thanks.

答案1

得分: 3

There's no commonly used name for that.

From RFC 3986 Section 3, here are the parts of the URI:

  foo://example.com:8042/over/there?name=ferret#nose
  \_/   \______________/\_________/ \_________/ \__/
   |           |            |            |        |
scheme     authority       path        query   fragment
   |   _____________________|__
  / \ /                        \
  urn:example:animal:ferret:nose
英文:

There's no commonly used name for that.

From RFC 3986 Section 3, here are the parts of the URI:

  foo://example.com:8042/over/there?name=ferret#nose
  \_/   \______________/\_________/ \_________/ \__/
   |           |            |            |        |
scheme     authority       path        query   fragment
   |   _____________________|__
  / \ /                        \
  urn:example:animal:ferret:nose

huangapple
  • 本文由 发表于 2023年3月1日 09:01:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/75598718.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定