javascript画图表方法
日志原文:http://zzgziyu.blog.sohu.com/109589244.html
<script>
("<html
xmlns:v><style>v\\:*{behavior:url(#default#VML)}</style>")
var
ct1=new ct()
function ct(){
="green,yellow,red,blue,gray,purple".split(",")
s=function(css,k,df){
if(css==null)
return
def==null ? "" : df
var r=new
RegExp("(^|)"+k+":([^\;]*)(\;|$)","gi")
var
a=(ce(/=/g,":").replace(/ /g,"").toLowerCase())
return
a==null ? (df==null ? "" : df) : (isNaN(a[2])||a[2]=="" ? a[2] :
parseInt(a[2]))
}
=function(vList,css){
var
l="",a,n,s,hsz,max=0,cx=20,ch
var
pw=s(css,"width",500),ph=s(css,"height",300)
if(ph<150||pw<150){
alert("图表区域太小,中断输出!")
return
}
a=(";")
for(var i in a){
a[i]=a[i].split(",")
for(var j in a[i]){
if(i>0&&j>0)
&
相关文档:
Definition and Usage
定义与用法The constructor property is a reference to the function that created an object.
constructor属性是所建立对象的函数参考Syntax
语法object.constructor
Example 1
举例
In this example we will show how to use the constructor property:
在这个举例中我们将展示如何使用cons ......
一,脚本程序与javascript
嵌套在HTML中的语言称为脚本语言,浏览器必须具有脚本引擎对嵌入HTML中的脚本程序进行解释。
eg:
<HTML>
<script language="JavaScript">
//VBScript,Jscript,ECMAScript
<!--
alert(n ......
根据身份证号码取得生日与性别,并判断18位身份证的正确与错误:
function showBirthday(val){
var birthdayValue;
if(15==val.length){//15位身份证号码
birthdayValue = val.charAt(6)+val.charAt(7);
if(parseInt(birthdayValue)<10){
birthdayValue = '20'+birthdayValue;
}else{
birthdayValue = '1 ......
几个表单验证的
function checkMail(obj,error)
{
if (obj == null)
return "NULL";
if (obj.value == "")
return "EMPTY";
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(obj.value))
return true;
else
alert(error);
return false;
}
......