看板 Ajax 關於我們 聯絡資訊
比如: <input type=text id='price' value='0'> document.GetElementById('a').value = 100; 則畫面會顯示100 但是檢視原始碼value仍然是0 用$('html')取得的value也是0 要如何取得跟畫面呈現一樣的html? 以這個案例就是要取得 <input type=text id='price' value='100'> -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.24.230 ※ 文章網址: https://www.ptt.cc/bbs/Ajax/M.1483166949.A.959.html
sohumi: 找到方法了, 直接改變attribute就會改變原始碼了 12/31 14:55
atg3344: $("#price").val("100") 01/16 21:28
shadowjohn: 大小寫關係嗎? GetElementById -> getElementById ? 01/17 09:27