<html>
<head>
</head>
<body>
<form name='form1' action='' method='post'>
<input type='text' name='aa' id='aa'>
<input type='button' value='check' onclick='checkUrl()'>
</form>
<script type="text/javascript" language="javascript">
function checkUrl()
{
var acurl=document.getElementById('aa').value;
var kk=location.href;
alert(kk);
var k=acurl.lastIndexOf('/');
alert(k);
var m=acurl.indexOf('-');
alert(m);
var s1=acurl.substring(k,m);
var sbase=acurl.substring(0,m);
alert(sbase+s1+'---1--.htm');
}
</script>
</body>
</html>
<head>
</head>
<body>
<form name='form1' action='' method='post'>
<input type='text' name='aa' id='aa'>
<input type='button' value='check' onclick='checkUrl()'>
</form>
<script type="text/javascript" language="javascript">
function checkUrl()
{
var acurl=document.getElementById('aa').value;
var kk=location.href;
alert(kk);
var k=acurl.lastIndexOf('/');
alert(k);
var m=acurl.indexOf('-');
alert(m);
var s1=acurl.substring(k,m);
var sbase=acurl.substring(0,m);
alert(sbase+s1+'---1--.htm');
}
</script>
</body>
</html>