- 浏览: 112616 次
- 性别:
- 来自: 深圳
最新评论
-
lwbjava2011:
...
通用复制内容到剪切板 -
zxsz4085:
火狐下没用啊,咋回事
通用复制内容到剪切板 -
rigger21:
...
禁止输入 -
inshua:
why not disabled=true
禁止输入
文章列表
页面显示一直在走的时间
- 博客分类:
- javascript
<div id="Time">
<%=System.DateTime.Now.Year %>年<%=System.DateTime.Now.Month %>月<%=System.DateTime.Now.Day %>日 <span id="hour"><%=System.DateTime.Now.Hour.ToString("00")%></span>:<span id="minute& ...
- 2008-03-20 10:24
- 浏览 1031
- 评论(0)
1.用css的expression判断表达式
input
{
background-color:expression(this.type=="text"?'#FFC':'');
}
优点:简单
缺点:expression判断表达式FireFox是不支持的。致命的是只能区分出一个(例如例子中就只能区分出text文本框),不要试图设置多个,下面的会将上面的覆盖掉
2.用css中的type选择器
input[type="text"]
{
background-color:#FFC;
...
- 2008-02-26 14:15
- 浏览 6935
- 评论(0)
// 添加引用->Com->Microsoft Excel 12.0 Ojbect Library
using Excel = Microsoft.Office.Interop.Excel;
string excelPath = @"C:\Documents and Settings\ch\Desktop\transaction.xls";
// 创建一个新Excel的Application
Excel.Application app = new Excel.ApplicationClass();
...
- 2008-02-20 17:20
- 浏览 3117
- 评论(0)
js 图片滚动
- 博客分类:
- javascript
左右跑
<div align="center">
<div id=demo style=overflow:hidden;height:33;width:50;>
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td id=demo1 valign=top>
显示的内容放在这里 </td>
<td id=demo2 valign=top></td>
</tr ...
- 2008-02-13 11:31
- 浏览 2145
- 评论(0)
declare @date datetime
set @date = Convert(datetime,'2008-01-01')
while @date <= '2008-01-31'
begin
print convert(nvarchar(10), @date, 120)
set @date=dateadd(day, 1, @date)
end
计算两个时间的时间差
select datediff(n,Convert(datetime,'08:30:00'),Convert(datetime,'08:53:00') ...
- 2008-01-30 17:28
- 浏览 1735
- 评论(0)
TextBox设置多行后,限制输入字数
- 博客分类:
- asp.net
<asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Rows="10" onkeydown="DoKeyPress(500)" onPaste="CheckPaste(500)">
<script type="text/javascript">
function DoKeyPress(maxLen){
...
- 2008-01-29 19:11
- 浏览 3649
- 评论(0)
/// <summary>
/// 下载文件
/// </summary>
/// <param name="vPath">文件路径(绝对路径)</param>
public static void DownloadData(string path)
{
if (File.Exists(path))
{
FileInfo DownloadFile = new FileInfo(path);
System.We ...
- 2008-01-19 10:00
- 浏览 1656
- 评论(0)
javascript事件查询综合
click() 对象.click() 使对象被点击。
closed 对象.closed 对象窗口是否已关闭true/false
clearTimeout(对象) 清除已设置的setTimeout对象
clearInterval(对象) 清除已设置的setInterval对象
confirm("提示信息") 弹出确认框, ...
- 2007-11-23 18:37
- 浏览 1145
- 评论(0)
onkeydown= "event.returnValue=false; "
或
onkeydown= "return false; "
- 2007-11-23 15:04
- 浏览 986
- 评论(2)
OnClientClick="this.disabled=true;this.form.submit();" UseSubmitBehavior="False"
在按钮属性中加入这段代码
- 2007-11-20 21:19
- 浏览 1521
- 评论(0)
HttpFileCollection files = Request.Files;
for (int i = 0; i 1024 * 4)
{
this.areaErrorMsg.Text = "提示:上传的文件超过允许的上限!";
return;
}
// 得到上传文件的类型
...
- 2007-11-13 15:58
- 浏览 1873
- 评论(0)
// 这种方法不用调用该函数
<script language="javascript"> function KeyDown() { // 当按下“回车键”时执行Submit事件 if (window.event.keyCode == 13) { // 前台调用后台事件 var keyword = document.getElementById("txtMail").value; if (ke ...
- 2007-11-10 18:19
- 浏览 2160
- 评论(0)
根据参数名称获取参数的值
- 博客分类:
- javascript
// 根据参数名称获取参数的值
function GetArgumentValueByName(argumentName) // 传参数名
{
var url = window.location.href;
var strValue = '';
url = url.split("?");
if (url.length > 1)
{
url = url[1].split("&");
argumentName = argumentName + "=";
for ( ...
- 2007-11-07 10:59
- 浏览 1426
- 评论(0)
/// <summary> /// 获取字符串中的数字 /// </summary> /// <param name="str">字符串</param> /// <returns>数字</returns> public static decimal GetNumber(string str) { decimal result = 0; if (str != null && str != string.Empty) { // 正则表达式剔除非数字字符(不包含小数 ...
- 2007-11-06 19:24
- 浏览 3837
- 评论(0)