解决方案 »
- 求个思路
- 求助access插入数据
- DXperience的重编译问题
- 如何在.CS页面动态生成任意数量的服务器控件TextBox?(几乎是新手帖!)
- 如何实现分页的无刷新?
- 帮忙改改 怎样使最小化的时候使从左边开始消失的 然后就立在左边了 最大化的时候在从左边出来!!!!
- 如何触发被嵌套在repeater控件中的子repeater控件的ItemDataBound事件
- 一步一步学习ASP.NET MVC 1.0创建NerdDinner 范例程序
- 如何在ASP。NET中实现TRF格式的输入与输出?
- 怎么把输入的字符串转换为최这样的格式?还有这是什么格式?
- Jquery.Uploadify error -220 IO.Error #2038
- MyIe3可以执行js,但IE8的就不能执行js,怎样处理?
<style type="text/css">
#Panel1{left: 10%;width: 50%;}
#Image1{left:250px;}
</style>
但用外联样式表调用相关css文件没效果。即
<link href="1024.css" rel="stylesheet" type="text/css" />
css代码为:
<style type="text/css">
#Panel1{left: 10%;width: 50%;}
#Image1{left:250px;}
</style>
与内部样式内容一样。
什么原因导致不能调用?虚心求解。
不要想当然地指定客户端 id。当你的控件有几百个、上千个以后,这类css设计很快就堆砌成一大片混乱的东西了。
2、将这两个控件都放到一个div中 <div style="width: 1024px; margin-left: auto; margin-right: auto; background: #eee;" ></div>
你好,Table里可以添加panel,image等控件么?出现下面错误
你好,Table里可以添加panel,image等控件么?出现下面错误
<form id="form1" runat="server">
<div>
<asp:Table ID="Table1" runat="server">
<asp:Panel runat="server">
</asp:Panel>
</asp:Table>
</div>
</form>
//css中设置Panel控件
<style type="text/css">
#pllogin
{ position:absolute; top:20; left:200; width:400;
height:500;
}
</style>
//Panel控件设置位置
<asp:Panel ID="pllogin" runat="server">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="style1"
style="background-image: url('使用Panel控件显示或隐藏一组控件.png'); font-size: small;">
<tr>
<td>
<table align="left" cellpadding="0" cellspacing="0" class="style2">
<tr>
<td class="style3">
用户名:</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style3">
密 码:</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style3">
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="登录" />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="新用户注册" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
</asp:Panel>
在<body>里,
<script language="javascript" type="text/javascript" >
if (window.screen.width <= 1024) {
document.getElementById("cssname").value = "1024.css";
}
else {
document.getElementById("cssname").value= "大版.css";
}
</script>
传给 <input runat="server" type="hidden" id="cssname" name="csstest" />
if条件判断是有效的。最终value值输出为空,传不到input中,怎么回事?请教
<style>
body {TEXT-ALIGN: center;}
#center {position: absolute; top:100px; }
</style>
<script>
function centerdiv() {
$("#center").css("left", (document.getElementById("center").parentElement.offsetWidth - document.getElementById("center").offsetWidth) / 2)
}
</script>
<div id="center" style=" width:auto; ">
<div style=" float:left;"><asp:Panel ID="Panel1" runat="server" Width="200px" >111111111111111111111111
</asp:Panel></div>
<div style=" float:right"><asp:Image ID="Image1" runat="server" Width="200px" ImageUrl="~/Images/NABG.jpg" /></div>
<div style=" clear:both;"></div>
</div>
document.getElementById("cssname").value= "大版.css"; 传值无效 ???
在<body>里,
<script language="javascript" type="text/javascript" >
if (window.screen.width <= 1024) {
document.getElementById("cssname").value = "1024.css";
}
else {
document.getElementById("cssname").value= "大版.css";
}
</script>
传给 <input runat="server" type="hidden" id="cssname" name="csstest" />
if条件判断是有效的。最终value值输出为空,传不到input中,怎么回事?能不能帮忙看看
if (window.screen.width <= 1024) {
document.getElementById("cssname").value = "1024.css";
}
else {
}
function obj() {
document.getElementById("cssname").value = "大版.css";
alert(document.getElementById("cssname").value)
} </script>
</head>
<body onload="obj()">
<panel style="float:left">
<img style="float:right">
</div>
只有IE6可能需要用position来解决居中问题
你好,按照你的方法我在body中加载了,但是还是取不到值,至于你上面举例写的alert(document.getElementById("cssname").value)是写在设置value值后,是肯定会有alert提醒的。
现在不知道为什么不能调用?是页面载入的问题吗?还是有其他可能?