首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

prototype.js 冲突? 如果去掉prototype.js 这个叶面运行正常 麻烦熟悉prototype.js 的指导一下,该怎么处理

2012-03-31 
prototype.js冲突?如果去掉prototype.js 这个叶面运行正常麻烦熟悉prototype.js 的指导一下!DOCTYPEHTMLP

prototype.js 冲突? 如果去掉prototype.js 这个叶面运行正常 麻烦熟悉prototype.js 的指导一下
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN "   >
<HTML>
<HEAD>
<title> a </title>
<META   http-equiv= "Content-Type "   content= "text/html;   charset=utf-8 ">
        <META   content= "MSHTML   6.00.3790.2666 "   name= "GENERATOR "> </HEAD>
<SCRIPT   language= "JavaScript "   src= "/dbfdc/control/js/prototype.js "   type= "text/javaScript "> </SCRIPT>
<meta   name= "vs_targetSchema "   content= "http://schemas.microsoft.com/intellisense/ie5 ">
</HEAD>
<body   MS_POSITIONING= "GridLayout ">
<form   id= "Form1 "   method= "post "   runat= "server ">
<DIV   id= "com_item "> </DIV>
<SCRIPT   language= "JavaScript ">
this.sel   =   new   Array();
this.urlArr   =   new   Array();
this.imgArr   =   new   Array();
this.sel_num   =   0;

function   comchk()   {
if(sel_num   <   2)   {
alert( '请至少选择两个楼盘! ')
}else   {
out   =   ' ';
i=0;
for(keay   in   sel){
++i;
//out   +=   "seq "   +   i   +   "= "   ;
out   +=keay+ ', ';

}
//var   str   =   "http://localhost/notebook/cgi-bin/notebook/compare.php?d_id= "+out;
var   str   =   "http://php.tech.sina.com.cn/notebook/compare.php?d_id= "+out;
window.open(str);
//window.open(str);
//window.open(str);
}
}
function   addhouse(idd,nm,myImg,myURL)   {
if(!sel[idd])   {
if(sel_num   > =   4)   {
alert( '最多只能有4个楼盘参加比较! ');
}else   {
sel_num++;
sel[idd]   =   nm;
imgArr[idd]   =   myImg;
urlArr[idd]   =   myURL;

}
}else   {
alert(   nm+ '   已选择! ');
}
draw();
}
function   delhouse(id)   {
sel2   =   new   Array();
for(keay   in   sel)   {
if(id!=keay)   {
sel2[keay]   =   sel[keay];
}
}
sel   =   sel2;
sel_num--;
draw();
}
function   draw()   {
out   =   ' ';
alert(sel);
for(keay   in   sel)   {
out   +=   " <table   width=150   border=0   cellpadding=0   cellspacing=0> <tr> <td   height=6   background=images/nt050.gif> </td> </tr> <tr> <td> <img   src=http://image2.sina.com.cn/IT/notebook/hz/images/nt031.gif   width=150   height=6> </td> </tr> <tr> <td   background=images/nt032.gif   align=right   style= 'padding-right:3px; '> <a   href=javascript:del( ' "+keay+ " ')> <img   src=images/nt049.gif   width=12   height=12> </a> </td> </tr> <tr> <td   background=images/nt032.gif   style= 'padding-bottom:3px; '   align=center   valign=top> <a   href=http://tech.sina.com.cn "+urlArr[keay]+ "   class=a05   target=_blank> "+sel[keay]+ " <br> <img   src= "+imgArr[keay]+ "   style=\ "border:1   solid   #000000\ "     width=109   height=96   alt= ' "+sel[keay]+ " '   vspace=4> </a> </td> </tr> <tr> <td   height=1   bgcolor=#A3AFBB> </td> </tr> </table> ";


// <font   color=#0000ff   size=1> <b> | </b> </font> <br> <input   type=button   onclick=\ "del( ' "+keay+ " ')\ "   value= ' "+sel[keay]+ " '   style= 'border:1px   solid;border-color:0000ff   ;background-color:#F4F5FD;height:24;width:120;cursor:hand;color: 'black '; '> <br> ";
}

com_item.innerHTML   =   out;
}
</SCRIPT>
<INPUT   TYPE= "checkbox "   id= "CheckBox1 "   style= "Z-INDEX:   102;   LEFT:   144px;   POSITION:   absolute;   TOP:   72px "
runat= "server "   onclick= 'if(this.checked){addhouse( "631a ", "联想 ", "a.jpg ", "a.htm ")}else{delhouse( "631a ")} '>
</form>
</body>
</HTML>
如果加上prototype.js   则出现一大堆prototype.js   里的脚本
该怎么办啊?     prototype.js   必须用:(

[解决办法]
<HEAD>
<title> a </title>
<META http-equiv= "Content-Type " content= "text/html; charset=utf-8 ">
<META content= "MSHTML 6.00.3790.2666 " name= "GENERATOR "> </HEAD>

把这里的 </head> 去掉试试
[解决办法]
把函数,变量一个个注释掉,慢慢找。。。可能是对象或者属性重叠了。
[解决办法]
你的 prototype.js 文件以什么编码保存的?

你以什么编码查看的这个页面.

这个页面以什么编码 保存的????

估计是编码的问题...
还有要注意 UTF8的头...

热点排行