Fetching currency using javascript ms crm 2013

function currency()
if(Xrm.Page.getAttribute(“transactioncurrencyid”).getValue()!=null)
{
var c = Xrm.Page.getAttribute(“transactioncurrencyid”).getValue();
alert(c);
}
}