Form:Inscription: Difference between revisions
From Cives
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 52: | Line 52: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
document.querySelector("#slikce").addEventListener("click", (e) => { | document.querySelector("#slikce").addEventListener("click", (e) => { | ||
let targetDiv = document.getElementById("slikce"); | |||
targetDiv.removeChild(targetDiv.lastElementChild); | |||
let inputSpan = document.getElementsByClassName("inputSpan").textContent; | |||
let regex = /<img[^>]*>/g; | |||
let imgTags = inputSpan.match(regex); | |||
imgTags = imgTags.slice(0, -1); | |||
inputSpan.textContent = '<div id="slikce">' + imgTags + "</div>"; | |||
}); | }); | ||
document.getElementById( "letterA" ).onclick = function() { | document.getElementById( "letterA" ).onclick = function() { | ||
var slika = document.createElement("img"); | var slika = document.createElement("img"); | ||
Revision as of 16:37, 3 April 2024
This is the "Inscription" form. To create a page with this form, enter the page name below; if a page with that name already exists, you will be sent to a form to edit that page.