0
I need to know how I change the links and images of a page via jQuery.
I have to make dynamic updates on a certain page and I need to create a script for this, that changes images and links.
Example:
<a href="link1"> <img src="imagem1"></a>
<a href="link2"> <img src="imagem2"></a>
Like, in this example I know that the href contains link1, link2 and that the tag img contains imagem1, imagem2
I need to know if I can create a script that captures the information the user enters and tracks the tags and automatically convert.
Imagine the user puts a link http://wikipedia.org.link1, in which case it would alter the href link1, the same would be for images.
Always change to what’s after the last
.? Or what exactly is the rule ?– Isac
The rule would be as follows: I would create a field (text box) and play the path of the images and links that I would like to change and these same data would change the data of index.html. Type, the script would consider the information typed in the field and make a comparison (type one contains in the link and images), more or less like this. HTML <a href="eusouolink1"> <img src="imagem2.png"></a> Text field In this case, with the script, the user would update the content with a new link and image, but containing the information in the href and img tags
– Thiago Diogenes