来自< A>的POST标签 [英] POST from an <A> tag
问题描述
是否可以从< a>
标签执行POST?我知道锚标签通常只是为GETs,我知道我可以使用JavaScript来做到这一点(如 JavaScript post request like a form submit ),但对我来说似乎有点混乱。有没有办法做到这一点直HTML?
有没有办法 从这个DTD片段可以看出( 没有属性控制是否使用 如果您想滥用语义,您必须来编写脚本。 Is it possible to do a POST from just an There is no way to As can be seen from this DTD fragment (HTML 4.01 spec): There is no attribute that controls whether to use You have to script it, if you want to abuse the semantics. 这篇关于来自< A>的POST标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! POST <
a
a href =http://www.w3.org/TR/html401/struct/links.html#adef-href =noreferrer> HTML 4.01规范):
<!ELEMENT A - - (%inline;)* - (A) - anchor - >
<!ATTLIST A
%attrs; - %coreattrs,%i18n,%events -
charset%Charset; #IMPLIED - 链接资源的字符编码 -
type%ContentType; #IMPLIED - 咨询内容类型 -
名称CDATA #IMPLIED - 指定链接结束 -
href%URI; #IMPLIED - 链接资源的URI -
hreflang%LanguageCode; #IMPLIED - 语言代码 -
rel%LinkTypes; #IMPLIED - 前向链接类型 -
rev%LinkTypes; #IMPLIED - 反向链接类型 -
accesskey%字符; #IMPLIED - 辅助键字符 -
形状%形状; rect - 用于客户端图像映射 -
coords%Coords; #IMPLIED - 用于客户端图像映射 -
tabindex NUMBER #IMPLIED - 按切换顺序的位置 -
onfocus%Script; #IMPLIED - 获得焦点的元素 -
onblur%Script; #IMPLIED - 元素失去焦点 -
>
POST
或> 元素。
<a>
tag? I know anchor tags are usually just for GETs, and I know I can use javascript to do this (like in JavaScript post request like a form submit) but to me that seems a little messy. Is there a way to do this with straight HTML?POST
an a
element using only HTML.<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
<!ATTLIST A
%attrs; -- %coreattrs, %i18n, %events --
charset %Charset; #IMPLIED -- char encoding of linked resource --
type %ContentType; #IMPLIED -- advisory content type --
name CDATA #IMPLIED -- named link end --
href %URI; #IMPLIED -- URI for linked resource --
hreflang %LanguageCode; #IMPLIED -- language code --
rel %LinkTypes; #IMPLIED -- forward link types --
rev %LinkTypes; #IMPLIED -- reverse link types --
accesskey %Character; #IMPLIED -- accessibility key character --
shape %Shape; rect -- for use with client-side image maps --
coords %Coords; #IMPLIED -- for use with client-side image maps --
tabindex NUMBER #IMPLIED -- position in tabbing order --
onfocus %Script; #IMPLIED -- the element got the focus --
onblur %Script; #IMPLIED -- the element lost the focus --
>
POST
or GET
with an a
element.