<asp:TextBox id="surname" Rows="30" runat="server" />
<asp:RadioButtonList ID="gender" RepeatDirection="Horizontal" CssClass="common" Runat="server">
<asp:ListItem Value="1" Text="男"></asp:ListItem>
<asp:ListItem Value="0" Text="女"></asp:ListItem>
</asp:RadioButtonList>要取值的控件:
<asp:TextBox id="showname" runat="server" />要实现的时,当showname是焦点的时候,自动根据上面的“姓”和“性别”来输入建议的内容:
如果姓的内容是:王,且选中性别的“男”时,显示姓名自动跳出“王先生”我对js不熟,谢谢
<asp:RadioButtonList ID="gender" RepeatDirection="Horizontal" CssClass="common" Runat="server">
<asp:ListItem Value="1" Text="男"></asp:ListItem>
<asp:ListItem Value="0" Text="女"></asp:ListItem>
</asp:RadioButtonList>要取值的控件:
<asp:TextBox id="showname" runat="server" />要实现的时,当showname是焦点的时候,自动根据上面的“姓”和“性别”来输入建议的内容:
如果姓的内容是:王,且选中性别的“男”时,显示姓名自动跳出“王先生”我对js不熟,谢谢
解决方案 »
- ASP.NET MVC 3.0 Razor中呈现多个实体对象
- 如何让主菜单时刻处于浏览器左边中间的位置?
- 截取字符串~~~~急!!!!!!!1
- 如何将两DataSet合并到一块,然后显示出来?给分......
- 完全基于.NET架构的网站测试,也许您能学到一点什么
- 应如何判读浏览器是否支持 javascript ?
- 取得DataTable某一列,将定列存为数组,如何来做?
- 如何在客户端强制性删除服务器上正被占用的文件夹
- 请问:如何在输入时就限制输入TextArea的内容长度呢?
- 高手请进:发电子邮件的程序错误
- aspx引用cs文件必须要编译cs吗?
- 接收不了FORM的值,如何解决,在线等!!!!
showname.Attributes.Add("onfocus", "yourjavascriptfunction()");
这样showname为焦点时,就会调用yourjavascriptfunction,当然,这个就是js的函数,需要你自己写了。
可是这个我不会写,我要的就是js,而不是onfocus啊 :(