VBScript Class - 11 by S P SHARMA CLASSES (7048972696)
<html>
<body>
<script type="text/VBScript">
s1="Manmohan"
s2="n"
n1=instr(s1,s2)
document.write("n1=" & n1 & "<br/>")
n2=instr(n1+1,s1,s2)
document.write("n2=" & n2 & "<br/>")
nr1=instrrev(s1,s2)
document.write("nr1=" & nr1 & "<br/>")
nr2=instrrev(s1,s2,6)
document.write("nr2=" & nr2 & "<br/>")
L=left(s1,3)
document.write("Left 3=" & L & "<br/>")
R=Right(s1,5)
document.write("Right 5=" & R & "<br/>")
M1=mid(s1,3,4)
document.write("M1=" & m1 & "<br/>")
M2=mid(s1,1,3)
document.write("M2=" & m2 & "<br/>")
M3=mid(s1,4,5)
document.write("M3=" & m3 & "<br/>")
S3="Sachin Parashar Sharma"
fname=left(s3,6)
document.write("fname=" & fname & "<br/>")
mname=mid(s3,8,8)
document.write("mname=" & mname & "<br/>")
lname=right(s3,6)
document.write("lname=" & lname & "<br/>")
document.write("........................<br/><br/>")
'S4=inputbox("Enter Your Name")
S4="Sachin Parashar Sharma"
fname=left(s4,6)
document.write("fname=" & fname & "<br/>")
mname=mid(s4,8,8)
document.write("mname=" & mname & "<br/>")
lname=right(s4,6)
document.write("lname=" & lname & "<br/>")
document.write("........................<br/><br/>")
document.write("Lcase=" & lcase(s3) & "<br/>")
document.write("Ucase=" & ucase(s3) & "<br/>")
document.write("Len=" & len(s3) & "<br/>")
S4=" Hello India "
document.write("S4=" & s4 & "<br/>")
document.write("S4=" & ltrim(s4) & "<br/>")
document.write("S4=" & rtrim(s4) & "<br/>")
document.write("S4=" & trim(s4) & "<br/>")
document.write("S3=" & replace(s3,"Sharma","Verma") & "<br/>")
document.write("S3=" & S3 & "<br/>")
document.write( strcomp("ram","raj") & "<br/>")
document.write( strcomp("ram","ram") & "<br/>")
document.write( strcomp("raj","ram") & "<br/>")
document.write( string(5,"ram") & "<br/>")
document.write( string(50,"*") & "<br/>")
document.write( strreverse("Hello") & "<br/>")
document.write( strreverse("150.58") & "<br/>")
</script>
</body>
</html>
No comments:
Post a Comment