Вот мой код Javascript:
function generate(choice)
{
if(choice==1)
{
charge++;
var new_row=document.createElement("tr");
var name="row"+charge;
new_row.setAttribute("name",name);
new_row.setAttribute("id",name);
var col1=document.createElement("td");
var col2=document.createElement("td");
var col3=document.createElement("td");
var col4=document.createElement("td");
col1.setAttribute("width","205");
col2.setAttribute("width","191");
col3.setAttribute("width","182");
col4.setAttribute("width","127");
var list1=document.getElementById("rep0").cloneNode(true);
id="rep"+charge;
list1.setAttribute("id",id);
var list2=document.getElementById("item0").cloneNode(true);
name="items[]";
list2.setAttribute("name",name);
id="item"+charge;
list2.setAttribute("id",id);
list2.setAttribute("onChange","match_row(this.id);");
// clone_nodes(list2,"item0");
var text=document.createElement("input");
name="minutes[]";
text.setAttribute("name",name);
text.setAttribute("value","15");
id="minutes"+charge;
text.setAttribute("id",id);
text.setAttribute("type","text");
var text2=document.createElement("input");
name="charges[]";
text2.setAttribute("name",name);
text2.setAttribute("value","28.00");
id="charges"+charge;
text2.setAttribute("id",id);
text2.setAttribute("type","text");
//text2.setAttribute("onChange","charge_calculator();");
col1.appendChild(list1);
col2.appendChild(list2);
col3.appendChild(text);
col4.appendChild(text2);
new_row.appendChild(col1);
new_row.appendChild(col2);
new_row.appendChild(col3);
new_row.appendChild(col4);
charges1=document.getElementById("charges");
charges1.appendChild(new_row);
final_charge=charge;
}
else if(choice==2)
{
payment++;
var new_row2=document.createElement("tr");
var col11=document.createElement("td");
var col22=document.createElement("td");
var col33=document.createElement("td");
col11.setAttribute("width","205");
col22.setAttribute("width","206");
col33.setAttribute("width","297");
var list11=document.createElement("select");
name="payment_type[]";
list11.setAttribute("name",name);
id="payment_type"+payment;
list11.setAttribute("id",id);
list11.setAttribute("onChange","set_payment_type(this.id);");
clone_nodes(list11,"payment_type0");
var text1=document.createElement("input");
text1.setAttribute("type","text");
name="amount[]";
text1.setAttribute("name",name);
id="amount"+payment;
text1.setAttribute("id",id);
var list22=document.createElement("select");
name="account[]";
list22.setAttribute("name",name);
id="account"+payment;
list22.setAttribute("id",id);
list22.setAttribute("onChange","correspond2(this.id);");
clone_nodes(list22,"account0");
col11.appendChild(list11);
col22.appendChild(text1);
col33.appendChild(list22);
new_row2.appendChild(col11);
new_row2.appendChild(col22);
new_row2.appendChild(col33);
charges2=document.getElementById("payments");
charges2.appendChild(new_row2);
final_payment=payment;
}
}
А вот код кнопки HTML, с которым я звонюКроме Internet Explorer, пожалуйста, помогите мне, я застрял.У меня тоже есть тренировки для IE.