var str=String("Hello"); anchor,link没有这两个属性 str.indexOf("H") str.charAt(1)
var str="csdn" document.write(str.link("http://community.csdn.net/"));
LZ想实现的是 RTTI reflection功能吧?在js里没这么强大的函数..
可以设置断点,调试的时候看所有属性(IE8里按F12)自定义类型可以这样看 <html> <head> <script language="javascript"> function obj(){ this.color="red"; this.other="iiii"; } var myobj=new String(); var debug=""; for (var i in myobj){ debug+=i+"- > "+myobj[i]+"\n" } alert(debug) </script> </head>
http://download.csdn.net/source/308916DHTML参考手册.rar
http://download.csdn.net/source/308913样式表中文手册.chm
http://download.csdn.net/source/304124
anchor,link没有这两个属性
str.indexOf("H")
str.charAt(1)
document.write(str.link("http://community.csdn.net/"));
<html>
<head>
<script language="javascript">
function obj(){
this.color="red";
this.other="iiii";
}
var myobj=new String();
var debug="";
for (var i in myobj){
debug+=i+"- > "+myobj[i]+"\n"
}
alert(debug)
</script>
</head>
</html>