Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bla</title>
<script type="text/javascript">
function close_div()
{
var mydiv = document.getElementById('mydiv');
mydiv.style.display = 'none';
}
</script>
<style type="text/css">
div#mydiv {
width:200px; height:50px;
border:1px solid #999;
margin:5px;
}
</style>
</head>
<body>
<form>
<input type="button" value="Hide" onclick="javascript:close_div(); return false;"/>
</form>
<div id="mydiv"></div>
</body>
</html>
Е аз както го направих се скрива само бутона сега..Pr0oF каза:Добави id на бутона и по същия метод скрий и него при натискане.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bla</title>
<form>
<input type="button" value="Hide" onclick="javascript:close_div(); return false;" id="button"/>
</form>
<script type="text/javascript">
function close_div()
{
var mydiv = document.getElementById('mydiv');
mydiv.style.display = 'none';
}
function close_div()
{
var button = document.getElementById('button');
button.style.display = 'none';
}
</script>
<style type="text/css">
div#mydiv {
width:200px; height:50px;
border:1px solid #999;
margin:5px;
}
div#button {
width:200px; height:50px;
border:1px solid #999;
margin:5px;
}
</style>
</head>
<body>
<div id="mydiv"></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>bla</title>
<script type="text/javascript">
function close_div()
{
var mydiv = document.getElementById('mydiv');
var method = document.getElementById('mymethod');
mydiv.style.display = 'none';
method.style.display = 'none';
}
</script>
<style type="text/css">
div#mydiv {
width:200px; height:50px;
border:1px solid #999;
margin:5px;
}
</style>
</head>
<body>
<form>
<input type="button" value="Hide" id="mymethod" onclick="javascript:close_div(); return false;"/>
</form>
<div id="mydiv"></div>
</body>
</html>