[請益] <form>的xhtml1.0 strict 檢測 不能用name屬性?

看板PHP作者 (XHTML&CSS&PHP)時間19年前 (2006/01/04 22:56), 編輯推噓4(401)
留言5則, 3人參與, 最新討論串1/1
ling.php" method="post" name="mailform"> ^Error: there is no attribute name for this element (in this HTML version) 表單可以通過檢測,但是form不行,如果沒有name又無法用js控制, 要怎麼改呢? 3Q -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.132.202.165

01/05 01:16, , 1F
用id
01/05 01:16, 1F

01/05 08:50, , 2F
document.forms[0]
01/05 08:50, 2F

01/05 15:29, , 3F
請問這是什麼意思....document.forms[0]....?
01/05 15:29, 3F

01/05 16:32, , 4F
指向第一個form,這樣form就算沒有name也能操作...
01/05 16:32, 4F

01/05 16:36, , 5F
上面是用js時的用法
01/05 16:36, 5F
文章代碼(AID): #13k-8So5 (PHP)
文章代碼(AID): #13k-8So5 (PHP)