How to get range value when have a strlen string : <p>Ex: When I key in a few value, result will show range </p>

<pre><code>I keyin a value 0007 =&gt; strlen is 4 =&gt; range is 1000 =&gt; 9999
I keyin a value 002  =&gt; strlen is 3 =&gt; range is 100 =&gt; 999
...
</code></pre>

<p>Can help me this ideas?</p>
