.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得到当的方法还是很多的,这也是其中一种
相关文档:
可以说几乎每个做过Web开发的人都问过,到底元素的ID和Name有什么区别阿?为什么有了ID还要有Name呢?!
而同样我们也可以得到最classical的答案:ID就像是一个人的身份证号码,而Name就像是他的名字,ID显然是唯一的,而Name是可以重复
的。
上周我也遇到了ID和Name的问题,在页面里输入了一个input
type= ......
<! - - ... - -> 註解
<!> 跑馬燈
<marquee>...</marquee>普通捲動
<marquee behavior=slide>...</marquee>滑動
<marquee behavior=scroll>...</marquee>預設捲動
......
目前在 http://developers.sun.com.cn 已正式宣布发布Java SE 6 API 中文版。
大家也可以从以下网址下载:
* HTML 格式 ( http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/html/zh_CN/api/index.html )
* zip 格式 ( http://download.java.net/jdk/jdk-api-localizations/jdk-api ......
<! - - ... - -> 注解
<!> 跑马灯
<marquee>...</marquee>普通捲动
<marquee behavior=slide>...</marquee>滑动
<marquee behavior=scroll>...</marquee>预设捲动
<marquee behavior=alternate>...</marquee>来回捲动
<marq ......
HTML中Select不用Disabled实现ReadOnly的另类实现.
<select onbeforeactivate="return false" onfocus="this.blur()" onmouseover="this.setCapture()" onmouseout="this.releaseCapture()">
<option>1</option>
</select> ......