<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Lang" content="en">
<meta name="author" content="">
<meta http-equiv="Reply-to" content="@.com">
<meta name="generator" content="PhpED 5.6">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="creation-date" content="11/11/2008">
<meta name="revisit-after" content="15 days">
<title>Untitled</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
type="text/javascript"></script>
</head>
<body>
<form id="testform">
<input class="clear" type="text" value="Always cleared" />
<input class="clear once" type="text" value="Cleared only once" />
<input type="text" value="Normal text" />
</form>
<script type="text/javascript">
jQuery.fn.log = function (msg) {
console.log("%s: %o", msg, this);
return this;
};
$(function() {
//Go through every input field with clear class using each function
//(NB! "clear once" is two classes clear and once)
$('#testform input.clear').each(function(){
//use the data function to save the data
$(this).data( "txt", $.trim($(this).val()) );
}).focus(function(){
// On focus test for default saved value and if not the same clear it
if ( $.trim($(this).val()) === $(this).data("txt") ) {
$(this).val("");
}
}).blur(function(){
// Use blur event to reset default value in field that have class clear
// but ignore if class once is present
if ( $.trim($(this).val()) === "" && !$(this).hasClass("once") ) {
//Restore saved data
$(this).val( $(this).data("txt") );
}
});
});
var input_text = $('#shopping_cart_items input.text');
input_text
.css('border', '3px dashed yellow')
.css('background-color', 'red')
.val("text updated");
</script>
</body>
</html>
分享到:
相关推荐
Spring Data JPA Demo
DataMatrix-DEMO DataMatrix编码 解码 源代码
springdata-jpa demo http://knight-black-bob.iteye.com/blog/2274879
spring data Neo4j 整合demo,基本整合案例,详细细节参考https://docs.spring.io/spring-data/neo4j/docs/5.1.3.RELEASE/reference/html
大屏数据可视化 综合使用条形图、柱状图、折线图、饼图、地图、数字翻牌器来实现一个常规的大屏数据可视化项目。 项目案例 - 上市公司地域分布 以百度地图为底图,结合ECharts绘制地理信息数据 旭日图 - 基于...
maven工程下的springDataJpa测试demo,mysql数据库
mysql通过data文件夹恢复数据和存储过程的方法
DataFrameDemo.py
Demo1 datasheet:有图说明。
android demo,sd卡文件存储和data下文件存储。
微信小程序demo:todo:wx.setStorageSync(KEY,DATA) 方法存放数据(源代码+截图)微信小程序demo:todo:wx.setStorageSync(KEY,DATA) 方法存放数据(源代码+截图)微信小程序demo:todo:wx.setStorageSync(KEY,DATA) ...
这是一个用Qt5.4做的DataMatrix生成Demo程序,能编码ASCII中的可见字符,不支持中文,输入字符以ASC或16进制形式。
大数据实战Demo系统-MaxCompute数据仓库数据转换实践.pdf 大数据实战Demo系统-MaxCompute数据仓库数据转换实践.pdf 大数据实战Demo系统-MaxCompute数据仓库数据转换实践.pdf 大数据实战Demo系统-MaxCompute数据仓库...
FinalData_Enterprise_2.0_Demo FinalData_Enterprise_2.0_Demo FinalData 数据恢复软件
零样本学习AwA的数据,可以用于零样本模型的训练和测试。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
spring data jpa 简单demo
spring-data-redis集成jedis简单demo。 包括和spring mvc 的简单集成
使用Pentaho Data Integration 5.0.3整合SQL Server数据库和Salesforce数据的一个Demo,包括ppt,kettle文件及所有数据库backup文件及参考文档及代码。
SpringDataRedis客户端 SpringData是Spring中数据操作的模块,包含对各种数据库的集成,其中对Redis的集成模块就叫做SpringDataRedis,官网地址:https://spring.io/projects/spring-data-redis - 提供了对不同...
2、数据集为电商真实商品评论数据,主要包括训练集data_train,测试集data_test ,经过预处理的训练集clean_data_train和中文停用词表stopwords.txt,可用于模型训练和测试,详细数据集介绍见商品评论情感数据说明...