Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<input type="button" [red]style="border-top-style:double"[/red] onClick="insereTexto(this.style.[red]borderTopStyle[/red])" value="Insere Texto" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title></title>
<style type="text/css">
</style>
<style type="text/css">
div#areaTexto {
position: absolute;
display: none;
background-color: pink;
border: dotted red 1px;
}
</style>
<script type="text/javascript">
var plus_some_pixels=10
function insereTexto(objecto)
{
var at=document.getElementById('areaTexto')
at.style.top=(findPos(objecto)[1]+plus_some_pixels)+'px'
at.style.display='block'
}
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop
}
}
return [curleft,curtop];
}
</script>
</head>
<body>
<div id="areaTexto">I am areaTexto</div>
<form action="#">
<p><input type="button" value="uno" onclick="insereTexto(this)"></p>
<p><input type="button" value="dos" onclick="insereTexto(this)"></p>
<p><input type="button" value="tres" onclick="insereTexto(this)"></p>
</form>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title></title>
<style type="text/css">
textarea.hideable {
position: absolute;
display: none;
}
</style>
<script type="text/javascript">
function sh(what)
{
var ta=document.getElementById('ta'+what)
ta.style.display='block'
ta.focus()
}
window.onload=function() {
var talist=document.getElementsByTagName('textarea')
for (var i=0;i<talist.length;i++) if (talist[i].className=='hideable') talist[i].onblur=function() { this.style.display='none' }
}
</script>
</head>
<body>
<div id="areaTexto">I am areaTexto</div>
<form action="#">
<p><input type="button" value="uno" onclick="sh(1)"><textarea name="ta1" id="ta1" class="hideable" cols="80" rows="25"></textarea></p>
<p><input type="button" value="dos" onclick="sh(2)"><textarea name="ta1" id="ta2" class="hideable" cols="80" rows="25"></textarea></p>
<p><input type="button" value="tres" onclick="sh(3)"><textarea name="ta1" id="ta3" class="hideable" cols="80" rows="25"></textarea></p>
</form>
</body>
</html>
display:block then shows it