ImageButton如何引入脚本!!??? 请教各位高手 imagebutton控件如何引入脚本 ???谢谢!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <asp:ImageButton OnClientClick="js脚本"... ibn. Attributes.Add("onmouseover", "this.style.cursor='hand';");ibn.Attributes.Add("onclick", "onresu('"+str+"')"); 显示或隐藏的元素的display不一定都是block,也可能是inline、table等情况,我这个都考虑了:<!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 id="Head1" runat="server"> <title></title> <script> var status; function abc(XelementId) { var element = document.getElementById('text1'); if (element.style.display == "none") element.style.display = status; else { status = element.style.display; element.style.display = "none"; } } </script></head><body> <form id="form1" runat="server"> <div id="div1" runat="server"> <input type="text" id="text1" /> <asp:ImageButton ID="ImageButton1" ImageUrl="~/abc.jpg" runat="server" OnClientClick="abc('text1');return false;" /> </div> </form></body></html> 前台 OnClientClick或者 后台imagebuttonID.Attributes.Add("onmouseover", "this.style.cursor='hand';"); sql中建立临时表 在.net中该怎么写 ASP.NET登录控件如何使用自己的数据库? Visual Studio 2005窗口出现这种问题,帮忙看下 帮忙看看这个sql怎么写??顺便祝大家新年快乐! WinCe6.0错误 关于如何在服务端获取同一页面中客户端隐藏控件的值的问题 关于VS.NET2003的ASP.NET项目的问题! 如何让asp.net与asp同时在一台电脑上运行? 我想建一个文件是和另一个文件差不多,怎么作? 装.net正式版遇到问题 正则表达式 求解。 如何获取邮件内容和附件
ibn.Attributes.Add("onclick", "onresu('"+str+"')");
<!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 id="Head1" runat="server">
<title></title>
<script>
var status;
function abc(XelementId)
{
var element = document.getElementById('text1');
if (element.style.display == "none")
element.style.display = status;
else
{
status = element.style.display;
element.style.display = "none";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="div1" runat="server">
<input type="text" id="text1" />
<asp:ImageButton ID="ImageButton1" ImageUrl="~/abc.jpg" runat="server" OnClientClick="abc('text1');return false;" />
</div>
</form>
</body>
</html>
imagebuttonID.Attributes.Add("onmouseover", "this.style.cursor='hand';");