易截截图软件、单文件、免安装、纯绿色、仅160KB

.net + html 同意注册

.net 功能十分强大,其实可以直接在里面写一些html的代码,比如像这样
<asp:CheckBox ID="checksingup" runat="server" Text='I have read and agree to <a href="abc.aspx">This is ABC web</a>'   onclick="ValidateTandCs" />
这种可以用于注册时的超链接到别的地方,当然可以发挥想像,所有Text都可以这么用。
 <asp:CustomValidator ID="cvTerms" runat="server" ValidationGroup="signupGroup" Display="Dynamic"
                            ClientValidationFunction="ValidateTandCs" EnableViewState="false" ErrorMessage="<%$Resources:Message,needagree%>" />
//这边errormessage是调用全域的message这样改起来会更方便些
 <script language="javascript" type="text/javascript">
    function ValidateTandCs(source, args)
    {
        args.IsValid = document.getElementById('<%= checksingup.ClientID %>').checked;
    }
    </script>
对于js,这里.net得到当的方法还是很多的,这也是其中一种


相关文档:

Struts的html:checkBox标签超郁闷的问题

 被Struts的html:checkBox标签使用的小问题郁闷了两天,今天终于找到了解决的办法。如果大家也遇到同样的问题,可以参考。
1)需求:
      当通过菜单进入页面时,页面中的checkbox处于被选中状态,页面提交后forward回本页,对应的checkbox保持提交时的状态,也就是说:如果提交时check ......

Html from 提交

关于Html
form
表单的提交,很容易。。。但如果不仔细还是能有很多错误。
提交的button name 属性为 submit form
的submit方法失效
。代码如下
# < html >
# < head > </ head >
# < script type = "text/javascript" >
# function getData(){
# ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号