Possible Duplicate:
Javascript StartsWith
I have a function in JavaScript which takes a string as parameter. Prototype:
function activateTab(pageId, tabCtrl, divId, otherdivId1, otherdivId2, disName);
I want to check if the last parameter, which is disName
starts with "com".
For example: "ComSomeName", or "ComSomeOtherName".