用ClientID来获取对象,把代码修改为: var txt= "<%=txtSupplyer.ClientID%>"; var v = document.getElementById(txt).value;