那有这样定义对象的?总感到你的对象怪怪的,改一下:<script>
function eles()
{
this.aa="a";
this.cc="c";
}
eles.prototype.to=draw;
function draw()
{
document.write("<table><tr><td>test laker</td></tr></table>");
document.write("<br>"+this.aa+"<br">+this.cc);}function addeles()
{
nod=new eles;
nod.to();
}</script><input type="button" value=addeles onclick="addeles()">
function eles()
{
this.aa="a";
this.cc="c";
}
eles.prototype.to=draw;
function draw()
{
document.write("<table><tr><td>test laker</td></tr></table>");
document.write("<br>"+this.aa+"<br">+this.cc);}function addeles()
{
nod=new eles;
nod.to();
}</script><input type="button" value=addeles onclick="addeles()">
解决方案 »
- 一个显示和收藏表格的js代码! 为什么只有IE上可用?Chrome Firefox Safari都实现不了?什么问题?
- 新年快乐,分享一个我写了1年的IM源码,谁要?可能有人听说过我写的“旺旺通”
- 用jq怎么实现这个效果...
- jquery ui拖动后保存位置求高人指点
- js文件怎么包含另一个js文件?
- 点击一个网页上的按钮怎么让他打开左面的搜索栏
- 怎麼在保持原table內容時在table加入一行<tr></tr>???
- 一个页面属性设置问题,高分求解!!!
- 怎么用java实现点省份的菜单里的辽宁选项,城市的菜单里就列出锦州、沈阳。
- 物理国际象棋每移动一个棋子记录棋盘(PGN),并追踪棋子
- 求一自动折叠、打开的浮动工具条
- 请教高手,请问有没有既可编辑其中数字又可以按上下箭头增减数字的东西,或者如何实现?
test laker
false我要的是:
test laker
a
c
<script>
function eles()
{
this.aa="a";
this.cc="c";
}
eles.prototype.to=draw;
function draw()
{
document.write("<table><tr><td>test laker</td></tr></table>");
document.write("<br>"+this.aa+"<br>"+this.cc);}function addeles()
{
nod=new eles;
nod.to();
}</script><input type="button" value=addeles onclick="addeles()">你看看,这就对了。你写错一个地方了,看见没有???
document.write("<br>"+this.aa+"<br">+this.cc);
==>
document.write("<br>"+this.aa+"<br>"+this.cc);搞的我也患你的错误。你看我改后的结果对不。我测试是正确的!