易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript如何判断字符串为正小数?

/// <summary>
/// 判断是否为正小数
/// </summary>
/// <param name="str"></param>
/// <returns>为正小数时返回true,其他返回false</returns>
public static bool IsDecimal(string str)
{
//声明Regex对象变量
Regex objAlphaPatt;
//定义其规则
objAlphaPatt = new Regex(@"^0\.\d*[1-9]\d*$");
if (objAlphaPatt.IsMatch(str) == true)
{
return true;
}
else
{
return false;
}
}


相关文档:

JavaScript CSS Style属性对照表

JavaScript代码
<mce:script type="text/javascript"><!--
function imageOver(e) {
e.style.border="1px solid red";
}
function imageOut(e) {
e.style.borderWidth=0;
}
// --></mce:script>
<img src="phplamp.gif" onmouseover="imageOver(this)" onmo ......

javascript开发系列(多框架)

opener.window表示打开它的原框架。
top表示顶部框架,
parent引用包含这个窗口的window对像
例子如下;
a.htm页面
<!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">
<hea ......

Javascript知识精华

<script    language="JavaScript" type="text/javascript" >
<!--
         .
//-->
</script>
.language已经被弃用,但为了兼容旧版本浏览器而保留,所以建议同时使用这language和type两个
.<!---     //-->& ......

JavaScript高级程序设计学习笔记5: DOM基础

<!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>
<title>DOM</title>
<meta http-equiv="Content-Type&quo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号