textbox失去焦点验证 当textbox失去焦点时,判断textbox是否为空,如果为空,后面加个Lable,如何给Lable赋值啊(“用户名为空”)? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用个验证控件<asp:RequiredFieldValidator ID="rfvLoginName" runat="server" ControlToValidate="txtuser_name" ErrorMessage="用户名不能为空" Height="1px"></asp:RequiredFieldValidator> <script type="text/javascript"> window.onload=function(){ var tbx1=document.getElementById("textbox1"); tbx1.onblur=function(){ if(tbx1.value==""){ document.getElementById("label1").innerHTML="用户名为空"; }}} </script><input type="text" id="textbox1"></input><span id='label1' style="color:red"></span> function lostfoucs(obj){ if(obj.value=="") { var label; label=document.getElementById("label1"); label.innerText="用户名为空"; }}<asp:TextBox id="txtUserName" runat="server" onblur="lostfoucs(this);"/> 弹出新窗口 读写文件时出错 Response.Redirect 调用方式如何到index页 搞了好久,不晓得为啥子,帮帮忙 请教:做一个PDF在线浏览页面,能判断客户端是否安装得有Acrobat等工具,有就直接将Acrobat关联到浏览器中浏览下载文件,否则就下载该同 日期再次出错!!! 没有解释LinkButton的问题 ASP.NET热点问题解答14个 用oledb可以更新视图么? MS 提出的解决asp与asp.net共享session的文章。与大家分享。 求<系统分析师UML实务手册 >一书的pdf asp.net 实现可输入的下拉列表
<asp:RequiredFieldValidator ID="rfvLoginName" runat="server" ControlToValidate="txtuser_name"
ErrorMessage="用户名不能为空" Height="1px"></asp:RequiredFieldValidator>
window.onload=function(){
var tbx1=document.getElementById("textbox1");
tbx1.onblur=function(){
if(tbx1.value==""){
document.getElementById("label1").innerHTML="用户名为空";
}}}
</script><input type="text" id="textbox1"></input><span id='label1' style="color:red"></span>
{
if(obj.value=="")
{
var label;
label=document.getElementById("label1");
label.innerText="用户名为空";
}
}<asp:TextBox id="txtUserName" runat="server" onblur="lostfoucs(this);"/>