惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
L
LangChain Blog
博客园_首页
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
WordPress大学
WordPress大学
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
C
Check Point Blog
IT之家
IT之家
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
D
Docker
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
I
InfoQ

博客园 - kenly33

ORM及代码生成器和插件C#源码(最新版Kenly.DBFramework4.5.8.5) 處理RadioButtonList客戶端事件 - kenly33 - 博客园 对象关系映射架构(DBFramework)及代码生成器和插件(源码) 使對象支持自定義比較 統計分數 讀寫XML文檔 - kenly33 - 博客园 Visual Studio Team System简介 过滤某些字段重复的记录 MultiFileUploador GridViewNavigator Gridview梆定 Gridview中梆定得RadioButton Javascript 隱藏或顯示某區域 ASP.NET 2.0中合并 GridView 的表头单元格 VS2005 RESOURCE MANAGEMENT 鲸鱼哲学 Javascript彈出對話框 FxCop Rules Atlas使用演练
兩個輸入框只允許一個輸入
kenly33 · 2007-04-07 · via 博客园 - kenly33

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="";
            }
        }