Saturday, December 17, 2016
text experiment 1
function atnbg20161217sa1055(instruction) {
var namespace = "atnbg20161217sa1055"
if (instruction === "createcard") {createcard(namespace)}
function createcard(namespace) {
var card = document.createElement("div")
window.document.body.appendChild(card)
var style = document.createAttribute("style")
card.setAttributeNode(style)
style.value = "position:fixed;left:100px;top:100px;width:600px;height:400px"
style.value = ";font-size:400px;background-color:violet;color:burlywood;display:none"
var id = document.createAttribute("id")
card.setAttributeNode(id)
id.value = namespace
card.appendChild(document.createTextNode("W"))}
if (instruction === "showhide") {showhide(namespace)}
function showhide(namespace) {
var card = document.getElementById(namespace)
if (card.style.display === "inline") {card.style.display = "none"}
else {card.style.display = "inline"}}
if (instruction === "createtoggle") {createtoggle(namespace)}
function createtoggle(namespace) {
var toggle = document.createElement("div")
window.document.body.appendChild(toggle)
var style = document.createAttribute("style")
toggle.setAttributeNode(style)
style.value = "position:fixed;right:0px;bottom:0px;width:100px;height:100px"
style.value = style.value + ";background-color:purple"
var onmouseover = document.createAttribute("onmouseover")
toggle.setAttributeNode(onmouseover)
onmouseover.value = namespace + '(' + '"showhide"' + ')'}}
atnbg20161217sa1055("createcard")
atnbg20161217sa1055("createtoggle")