Created
November 21, 2020 08:28
-
-
Save TerhoAntila/a0082e86a7f34120e853bdc096b47b7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<script> | |
var url = new URL(window.location.href); | |
var data = url.searchParams.get("data"); | |
var params = {}; | |
data.split('&').forEach(element => { | |
params[element.split('=')[0]] = element.split('=')[1]; | |
}); | |
function doEmbedding(){ | |
var elmWrapper = document.getElementById("contents"); | |
var div = document.createElement("div"); | |
div.innerText = params.testparam + " " + params.testparam2; | |
elmWrapper.appendChild(div); | |
} | |
</script> | |
<body> | |
<h1>This is test page</h1> | |
<div id="contents"></div> | |
</body> | |
<script> | |
doEmbedding(); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment