var op='train';var str='<input type="hidden" name="'+op+'" /><a href="#" onclick="openFile('+op+')" id="'+op+'Value">'+xhr.responseText+'</a><br/>';document.getElementById(""+op+"Value1").insertAdjacentHTML("beforeEnd",str);xhr.responseText是一張圖片名。當我點擊超鏈接圖片的名字,調(diào)用openFile(p)我alert(p);是object HtmlInputElement;我想得到 train字符串,怎么獲?。苛碜ⅲ?p.nodeValue p.toString() p.valueOf())我都試了,得不到值。。。。
jS取值問題
30秒到達戰(zhàn)場
2018-12-07 13:37:01