JSFiddle - React, Tailwind, and code Playground
by Imri Paloja
HTML
<p>Click the button to demonstrate the prompt box.</p>
<button onclick="link()">Link</button>
<p id="demo"></p>
<script>
function link() {
var link = prompt("Insert hyperlink=\"\"", "http://");
var title = prompt("Insert hyperlink title=\"\"", "title");
var name = prompt("Insert hyperlink name=\"\"", "name");
if (link != null) {
document.getElementById("demo").innerHTML =
"\<a href=\"" + link + "\" title=\" " + title + " \"> " + name + " </a>";
}
}
</script>
CSS
/*
Just some fancy styling
*/
html, body {
padding: 5px;
color: #454545;
}
button {
background-color: #EEEEEE;
border: 1px solid #CCCCCC;
color: #454545;
padding: 0px 5px;
}
button:hover {
background-color: #CCCCCC;
cursor: pointer;
}
a {
color: brown;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
p {
padding: 5px;
margin: 5px;
}