Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 6:28 p.m. on August 22, 2006

Javascript how interception string?

Javascript how interception string?

O string used to operate several functions :
Interception you how specific point

Abcdefg
Asked interception countdown two characters is "ef"

String.substring (2,6)

"Script>
String= "abcdefg"
Alert (string.substring (string.length-2, string.length))
"/script>

[html]<script>
Alert ( "abcdefg." Match (/.* (. {2}) /) [1])
"/script>[/html]

Countdown should be two fg ah, how ef? Talk about the landlord to find out :)

LeXRus similar, and you can use
[html]
"Script>
Alert ( "abcdefg." Match (/.{2}$/))
"/script>
[/html]

String operations, it is better to use
[html]
"Script>
Alert ( "abcdefg." Tomography (-2))
"/script>
[/html]

Thank you for your help!




 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com