<!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>
<title>无标题页</title>
<script language="javascript" type="text/javascript">
function close(){
document.getElementById('close').style.display="none";
document.getElementById('remove').style.display="none";
alert("有没有反映呢");
}
function open()
{
alert("什么情况"):
document.getElementById('close').style.display="block";
document.getElementById('remove').style.display="block";
}
</script>
</head>
<body onload="open()" >
<form id="form1" runat="server">
<div style="background-color:Gray; top:132px">
<div id="remove" style=" border:4px">
<div id="close" onclick="close()" style=" width:26px; height:18px;
background-color:Red"></div>
<div> <label id="labTitle" runat ="server" title="我是标题">
</label>
</div>
<div>
<label id="labContent" runat="server" >rewrreeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeee</label></div>
</div>
</div>
</form>
</body >
</html>
//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
<script language="javascript" type="text/javascript">
function close(){
document.getElementById('close').style.display="none";
document.getElementById('remove').style.display="none";
alert("有没有反映呢");
}
function open()
{
alert("什么情况"):
document.getElementById('close').style.display="block";
document.getElementById('remove').style.display="block";
}
</script>
</head>
<body onload="open()" >
<form id="form1" runat="server">
<div style="background-color:Gray; top:132px">
<div id="remove" style=" border:4px">
<div id="close" onclick="close()" style=" width:26px; height:18px;
background-color:Red"></div>
<div> <label id="labTitle" runat ="server" title="我是标题">
</label>
</div>
<div>
<label id="labContent" runat="server" >rewrreeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeee</label></div>
</div>
</div>
</form>
</body >
</html>
解决方案 »
- 能否为onclick事件动态加js代码?
- js如何将标签文字变成canvas?
- javascript中如何对一个文件进行二进制读写?
- 求一个判断"1-101abdde
- 超难问题 在线编辑器中怎么实现表格合并
- 为何flash中调用vbs函数可以,而js函数不行呢?
- 请问:setExpression是怎么用的,有没有例子。
- 在带有form表单提交的页面中,refresh页面时老是弹出,"不重新发送信息,则无法刷新网页",请问怎样才能在不再发送信息的情况下,刷新页面呢?
- 如何实现细线表格?打印出来也要有细线
- kindeditor上传图片,怎么默认打开本地图片啊?
- 请大侠帮我看看下面语句如何传字符串参数,谢谢。
- 页面刷新后,全局变量的值没了!怎么控制!!!急急急!!!
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="WebForm1.aspx.cs" Inherits="WorldCup.WorldCup.WebForm1" %><!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>
<title>无标题页</title> <script language="javascript" type="text/javascript">
function closeDiv(){
document.getElementById('close').style.display="none";
document.getElementById('remove').style.display="none";
alert("有没有反映呢");
}
function open()
{
alert("什么情况");
document.getElementById('close').style.display="block";
document.getElementById('remove').style.display="block";
}
</script></head>
<body onload="open()">
<form id="form1" runat="server">
<div style="background-color: Gray; top: 132px">
<div id="remove" style="border: 4px">
<div id="close" onclick="closeDiv()" style="width: 26px; height: 18px; background-color: Red">
关闭
</div>
<div>
<label id="labTitle" runat="server" title="我是标题">
</label>
</div>
<div>
<label id="labContent" runat="server">
rewrreeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeee</label></div>
</div>
</div>
</form>
</body>
</html>自己做一下对比吧~ . 页面加载的时候出现问题. 第一个就是我刚才说的 open()方法 括号你用的全角. 第二点 open方面里面的alert() 后面的符号你写错了 是;不是:第三点就是方法名字的问题.
我刚才试过了,你把方法名改了就可以了
<!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>
<title>无标题页</title>
<script language="javascript" type="text/javascript">
function closed(){
alert("有没有反映呢");
}
function open()
{
alert("什么情况");
}
</script>
</head>
<body >
<form id="form1" runat="server">
<div style="background-color:Gray; top:132px">
<div id="remove" style=" border:4px">
<div id="close" onclick="closed()" style=" width:26px; height:18px;
background-color:Red">close</div>
<div> <label id="labTitle" runat ="server" title="我是标题">
</label>
</div>
<div>
<label id="labContent" runat="server" >rewrreeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeee</label></div>
</div>
</div>
</form>
</body >
</html>