sniper
11-15-2005, 08:45 AM
As some of you ay know, I am on an internship right now and they have given me the task of removing javascript from an entire site and replacing it with asp. Here's the code:
function trim(str)
str = this != window? this : str
return str.replace(/^\s+/g, "").replace(/\s+$/g, "")
end function
I have to change this to asp, the only problem is that "?" is really confusing me. I know what "?" do in regular expresions but that line doesn't look like a regex to me. How would I convert that?
function trim(str)
str = this != window? this : str
return str.replace(/^\s+/g, "").replace(/\s+$/g, "")
end function
I have to change this to asp, the only problem is that "?" is really confusing me. I know what "?" do in regular expresions but that line doesn't look like a regex to me. How would I convert that?