http://www.cnblogs.com/zhoufeng/archive/2010/06/09/Javascript.html
注意:
1。没有返回值的函数, 再JS里面是不能调用的,操作数据库的方法,只能用ajax来调用
2. 掉后台函数,传参的办法
public string ss(string ssValue) {
return ssValue;
}
上面是C#,下面是JS
<script>
function alertValue(id) {
var s = '<%=ss("' + id + '") %>';
alert(s);
}
</script>
<input id="Text1" onclick=" alertValue(23)" />
<input id="Text2" onclick=" alertValue(444)" />