I have the following <input>
and <img>
on the page.
<input class="form-control" id="cordenadasaqui" value="47644.63956 74592.843" readonly>
<img id="imagemaqui" src="http://www.meusite.com/los-santos.jpg">
Ineedtomakeadifferentimageappearforeachsetofcoordinatesdisplayed.
Example
Ifthe<input>
aboveiswiththevalue=" "
contained in the first 11 characters:
47644.63956
The displayed image will be:
<img id="imagemaqui" src="http://www.meusite.com/los-santos.jpg">
Ifyouhavevalue=" "
containing the following numbers in the first 11 characters:
87635.98456
The displayed image will be:
<img id="imagemaqui" src="http://www.meusite.com/las-venturas.jpg">
Tosimplifythequestion
In%w/w%acertainsetofnumberswillbeloaded,andthenonlythefirst11characters(10numbersand1point".") should be fetched.
If these first 11 characters are value=" "
= 47644.63956
If these first 11 characters are los-santos.jpg
= 87635.98456
And so on ... How to do this?