Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (28 sloc) 0.959 kb
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="cors.js"></script>
<script type="text/javascript">
function testGet()
getCORS('', null, function(data){alert(data);});
function testPost(form)
postCORS('', {name:}, function(data){alert(data);});
<h1>CORS Examples</h1>
<p>Test GET
This page retrieves content from another server, using CORS<br />
<a href="#" onclick="testGet(); return false;">Get content from another server</a>
<p>Test POST:
<form action="#" onsubmit="testPost(this); return false">
Name: <input type="text" name="name" />
<input type="submit" />
<a href="">More info</a>
Jump to Line
Something went wrong with that request. Please try again.