<script>
function examplefunc()
{
var str;
var newstr;
var cnt;
str= document.test.ss.value;
cnt = str.length - 1;
newstr = str.substr(0,cnt);
alert(newstr);
}
</script>
<form
<input type="text" name="ss" />
<input type="button" name="cl" value="click here" onclick="examplefunc();" />
</form>
Main Topics
Browse All Topics





by: pratima_mcsPosted on 2009-10-28 at 23:58:18ID: 25691170
try this
0,str.leng th -1));
<script type="text/javascript">
var str="Hello";
document.write(str.substr(
</script>