Hi all,
I want to check any - symbol is present in the textbox.I am trying with this code.But this is not working.Can some one help.The condition is that it should contain only one hiphen symbol
Thanks in Advance
Dana
I want to check any - symbol is present in the textbox.I am trying with this code.But this is not working.Can some one help.The condition is that it should contain only one hiphen symbol
Code:
function isHiphenpresent(value) { var j, k; for(j=0;j<value.length;j++) { k = value.substr(j,1); if((k=='-')) ; else return false; } return true; }
Dana
Comment