Check here
javascript:Function("alert('this is ok')")();
same as
new Function("alert('this is ok')")();
What the syntax called ?
Any reference ?
EDIT
Sorry, my fault,it's only a label,and it's not equals new.
<script>
javascript:C("val");
wener:C("val");
function C(v)
{
this.val = v;
alert(window.val)
}
</script>
<a href="javascript: alert('foo');">click me</a>
For <a href="javascript: alert('foo');">click me</a> see URI_scheme(Thanks apsillers) and draft-hoehrmann-javascript-scheme