Where there is a will , there is a way .
kenly

No pain , no gain .

 

兩個輸入框只允許一個輸入

txtRegisterCode.Attributes.Add("onkeypress", "ClearInput(this);");
            txtSupplierName.Attributes.Add("onkeypress", "ClearInput(this);");

function ClearInput(inputingControl)
        {
            var prefix = "ctl00_ContentPlaceHolder1_";
            var txtRegisterCode = document.getElementById(prefix+'txtRegisterCode');
            var txtSupplierName = document.getElementById(prefix+'txtSupplierName');
            if(txtRegisterCode==inputingControl)
            {
              txtSupplierName.value="";
            }
           
            if(txtSupplierName==inputingControl)
            {
              txtRegisterCode.value="";
            }
        }

posted on 2007-04-07 16:54  kenly33  阅读(163)  评论(0)    收藏  举报

导航