使用javascript抓取值并将它们放入mailTo(firefox bug)

时间:2012-03-30 16:33:00

标签: html jsp struts struts-1

我在jsp中使用javascript获取div / list;所以我可以将它传递给mailTo HTML功能(在你的defualt电子邮件客户端中打开电子邮件模板);抓住这些值在chrome中有效,但在firefox中却没有!(它在电子邮件中打印出“undefined”)任何帮助都会很棒!

  

var order = document.getElementsByClassName(“order”);

     

var elementorder = order [0] .innerText;

<div class ="order">
<logic:presentname="serviceDeskForm" property="handsetData">
<logic:iterate id="element6a" name="serviceDeskForm" property="handsetData">
<bean:write name="element6a" property="handsetManufacturer"/><bean:write name="element6b" property="handsetModel" />
<bean:write name="element6c" property="handsetQty" />
<bean:write name="element6c" property="powerSupplyQty" />
<br></logic:iterate>
</logic:present>
</div>

1 个答案:

答案 0 :(得分:0)

为什么不将电子邮件的ID分配给所需的节点。那你就做了

 document.getElementById("my-id").property; //or whatever your property name is.