原来代码,执行鼠标弹起事件
c#:
TextBox1.Attributes.Add("onkeyup", "JavaScript:txtHeight()");
aspx:
function txtHeight() {
document.getElementById("TextBox1").value=1;
}现在我想改一种写法
c#:
TextBox1.Attributes.Add("onkeyup", "JavaScript:txtHeight("+TextBox1+")");
aspx:
function txtHeight(obj) {
document.getElementById(obj).value=1;
}怎么不行哎,有什么地方写错了吗