<!-- Part of javalessons.com (c)2007 SEMM(NL) All rights reserved Author:P.Hamaker For educational purposes only.-->
<html>
<body style="font-family: sans-serif; font-size: large; margin-left: 10; margin-top: 10">
JavaScript Lesson Strings<p>
<p>
<script type="text/javascript">
var str, str2, nr=0, nr2=0, pos=-1 ;
str = document.location.href ;
document.write( '1. ' + str );
document.write( '<br>' );
document.write( '2. Length : ' + str.length );
document.write( '<br>' );

pos = str.indexOf( '/' ) ;
document.write( '3. pos : ' + pos + '<br>' );
str2 = str.substring( 0, pos );
document.write( '4. Before first slash : ' + str2 );
document.write( '<br>' );

pos = str.lastIndexOf( '/' ) ;
str2 = str.substring( pos );
document.write( '5. From last slash : ' + str2 );
document.write( '<br>' );

str2 = '120' ;
nr = 34 ;
str2 = str2 + nr ;
document.write( '6. ' + str2 +  ' !??' );
document.write( '<br>' );

str2 = '120' ;
nr2 = parseInt( str2 ) ;
document.write( '7. ' +  (nr + nr2) );
document.write( '<br>' );

document.write( '8. ' +  str2.charAt(2) );
document.write( '<br>' );

document.write( '9.  \'  \\  ' );
document.write( '<br>' );
</script>
<p><a href="http://javalessons.com" target="_top"><tt>JavaLessons.com</tt></a>
</body></html>