<script language="javascript" type="text/javascript"> var txtText4 = "#" + ‘<%= new DynamicControl(this, "Text4").ClientID%>‘; $(function () { $(txtText4).keyup(function (e) { if (e.which == 32) $(this).val("TEXT"); }); }); </script>
JavaScript实现在文本框中输入空格时自动填写某个值,布布扣,bubuko.com
原文:http://www.cnblogs.com/kangjing/p/3807394.html