javaScript实现修改输入框之后标红
<html>
<title>实现标红</title>
<script type="text/javascript">
function edit_save(value1){
for(var i=1;i<4;i++){
if(value1==1)
document.getElementById('input'+i).disabled="";
else
document.getElementById('input'+i).disabled="none";
}
}
function blurTest(inputTag,value1){
var newValue = document.getElementById(inputTag).value;
if(value1!=newValue){
document.getElementById(inputTag).style.color = '#ff0000';
}else{
document.getElementById(inputTag).style.color = '#000000';
}
}
</script>
<body>
<table border='0' width = "800" align="center">
<tr>
<td><input id="input1" type="text" value="A" disabled="true" onblur="blurTest('input1','A')" ></input><td>
<td><input id="input2" type="text" value="B" disabled="true" onblur="blurTest('input2','B')" ></input><td>
<td><input id="input3" type="text" value="C" disabled="true" onblur="blurTest('input3','C')" ></input><td>
<td><input type="button" onclick="edit_save('1')" value="编辑"></td>
<td><input type="button" onclick="edit_save('2')" value="保存"></td>
</tr>
<table>
</body>
</html>
javaScript实现修改输入框之后标红的更多相关文章
- Word修订内容批量标红
最近改文章,期刊要求提供所有修改内容都标红的修订稿,本着能不手改就不手改的原则,我尝试检索了一下自动修改的方法,最先找到的是简书上的一篇使用VB宏命令批量修改的文章 (Word-接受全部修订为标红字体 ...
- selenium 操作过程中,元素标红高亮的两种实现方式
在使用selenium时,动作元素标红高亮,在定位问题时相当好用,有以下二种方法可以实现 一.使用js将元素属性修改 这也是网上大部分的实现方式,但有时候会有点小问题,代码如下: 只写其实某一段函数 ...
- python已安装好第三方库,pycharm import时仍标红的解决办法
pip install pymysql之后导入import pymysql时候标红 发现 pymysql下方还是标红,不能正常导入 可以试用一下以下的办法 解决办法: 首先打开 Settings找到P ...
- 通过自定义拦截器优雅的导出Excel并标红的重复数据
平时我们导入导出Excel的时候如果用poi导出,会发现光设置格式都要很多代码,看起来非常的不优雅.后来业务中遇到了需要导入非常巨大的Excel的需求.如果继续用poi的方式,因为poi把所有exce ...
- Intellij IDEA @Override 标红
Intellij IDEA 升级到15之后,之前那些@Override 的都标红,提示@Override is not allowed when implement interface method ...
- 第九篇、UITabbar增加类别用来标红点
1.系统中只有设置bage的方式,设置为nil也是为一个红点,但是很大,并不是我们需要的 2.扩充标红点的方法 (常用于有新的动态提示标志) #import <UIKit/UIKit.h> ...
- iOS UILabel 使用姿势大全(标红关键字)
一.初始化 ? 1 2 3 UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 40, 120, 44)]; ...
- JavaScript动态修改html组件form的action属性
用javaScript动态修改html组件form的action属性,可以在提交时再决定处理表单的页面. <%--JavaScript部分--%><script language=& ...
- Android studio新建文件出现setContentView(R.layout.activity_main);中的R标红错误解决方法
今天打开Android studio突然出现了setContentView(R.layout.activity_main);中的R标红错误,这已经不是第一次出现这个错误了,真心的觉得Android s ...
随机推荐
- HDU 2546
饭卡 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submiss ...
- Plugins
Plugins AdminLTE makes use of the following plugins. For documentation, updates or license informati ...
- iis上json解析失败404
控制面板->打开或关闭windows功能->Internet信息服务->万维网服务->应用程序开发功能,勾选上“.net扩展性”和“ASP.NET”,保存后,重启IIS服务器. ...
- js console 一些拓展技巧
console.time 方法 / console.timeEnd() 方法 统计一段代码的执行时间, 形参必须一致 console.time("string"); for(var ...
- php中htmlspecialchars和htmlentiti
Certain characters have special significance in HTML, and should be represented by HTML entities if ...
- ios-获取通讯录 姓名和电话
#import "ViewController.h" #import <ContactsUI/ContactsUI.h> @interface ViewControll ...
- FreeMarker的教程
copy自http://demojava.iteye.com/blog/800204 以下内容全部是网上收集: FreeMarker的模板文件并不比HTML页面复杂多少,FreeMarker模板文件主 ...
- PHP多台服务器跨域SESSION共享
网站业务规模和访问量的逐步发展,原本由单台服务器.单个域名的迷你网站架构已经无法满足发展需要. 此时我们可能会购买更多服务器,并且启用多个二级子域名以频道化的方式,根据业务功能将网站分布部署在独立的服 ...
- iOS ARC中CTCallCenter没用,无法监听电话的解决方案
今天在尝试使用CTCallCenter进行电话监听时,发现一直无法捕获电话状态改变的事件,研究了一番之后找到了解决方案,在这里分享给大家. 首先使用CTCallCenter监听电话的代码如下: CTC ...
- magento -- 解决magento错误:ERROR: Base table or view already exists: 1050 Table ... already exists
相信有更新magento或者,备份转移magento站点的时候可能会碰到类似这样的错误提示: Base table or view already exists: 1050 Table ... alr ...