如何把这种js代码放入单独的文件中
我使用的是jquery给控件注册事件,当页面加载完成后注册事件,代码是这样的
<script type="text/javascript">
$().ready(function() {
$(".txtInput").focus(function() {
$(this).removeClass("txtInput").addClass("usertxtInput");
}) .blur(function() {
$(this).removeClass("usertxtInput").addClass("txtInput");
});
})
</script>