Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Monday, November 28, 2011

Sample code to replace an ampercent symbol using Javascript.

function CorrectStringAsSPData(strValue)
{
//Replace & symbol
if(strValue)
{
var givenString=strValue.replace(/&/g,"&");

//Replace < symbol givenString=givenString.replace(/ symbol
givenString=givenString.replace(/>/g,">");

//alert(givenString)
return givenString;
}
}

No comments:

Post a Comment