|
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! |
|