Open the security role and get Guid of the each security role
you can get guid as shown in figure then make variable with the name of security role and assign id to variable.
Note:while assign id the alphabetic character should be in small case.

here is code how add securityroles Guids(ids)
function test()
{
var salesPerson="54810818-fda5-e311-ad13-835e905085a1";
var salesManager="9f830818-fda5-e311-ad13-835e905085a1";
var userRoles = Xrm.Page.context.getUserRoles();
//SalesPerson Role
if(userRoles==salesPerson)
{
Xrm.Page.getControl("new_test").setDisabled(false);
}
else
{
Xrm.Page.getControl("new_test").setDisabled(true);
}
//SalesManager Role
if(userRoles==salesManager)
{
Xrm.Page.getControl("new_test2").setDisabled(false);
}
else
{
Xrm.Page.getControl("new_test2").setDisabled(true);
}
}
Muhammad Sohail