A lot depends on where the injection is, but a simple example would be
<a href="javascript:alert(1)">XSS</a>
html- javascript: alert (1), XSS. iframe src, document.location =, window.open() , html .
, URL ,
<a onclick='http://www.foo.com?injection='*alert(1)*''>XSS</a>
html , onevent javascript.