javascript 文本框刷新的时候保存文本值
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>文本框刷新的时候保存文本值</title>
<META NAME="save" CONTENT="history">
<STYLE>
.txtsave {behavior:url(#default#savehistory);}
</STYLE>
</head>
<body>
<form id="form1" runat="server">
<div>
文本保存:<asp:TextBox ID="TextBox1" runat="server" CssClass="txtsave"></asp:TextBox>
<br />
对照文本:<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></div>
</form>
</body>
</html>
实现效果:
点击IE中的刷新按钮:
刷新后的效果:
相关文档:
/*****************************************************************************
* md5.js
*
* A JavaScript implementation of the RSA Data Security, Inc. MD5
* Message-Digest Algorithm.
*
* Copyright (C) Paul Johnston 1999. Distributed under the LGPL.
************************************** ......
=====能去中间==================================================
方法一:(不能去换行等)
代码简洁有力。妙就妙在split函数的使用上。先用空格分割(split)字符串,然后拼接.不得不佩服之,才思敏捷啊。看这样的代码,让人神清气爽。
function IgnoreSpaces(Str){
var ResultStr = "";
......
http://www.xker.com/page/e2008/0807/55407.html
最近发现DOMDocument对象很重要,还有XMLHTTP也很重要
注意大小写一定不能弄错.
属性:
1Attributes 存储节点的属性列表(只读)
2childNodes 存储节点的子节点列表(只读)
3dataType 返回此节点的数据类型
4Definition 以DTD或XML模式给出的节点的定义(只读 ......
<input type=text onkeypress="return event.keyCode>=48&&event.keyCode<=57||(this.value.indexOf('.')<0?event.keyCode==46:false)" onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false">
<asp:TextBox ID="TextBox1" runat="server" onkeyu ......