Hers是我爲功能編寫的代碼,當點擊圖像時,dailog窗口應該加載窗體輸入元素。請查看下面的代碼,並讓我知道我犯的錯誤。圖像onclick()函數顯示帶窗體細節的dailog窗口
代碼: -
<dialog id="login" style="border-color: blue; border: 1px solid">
<form name="reg">
First Name : <input type="text" name="fname" required>
Last Name: <input type="text" name="lname" required>
Email <input type="email" name="mail" required>
Password: <input type="password" name="pass" required>
Confirm Password : <input type="password" name="confpass" required>
<button type="submit"></button>
<button type="reset"></button>
</form>
</dialog>
<script>
function registration(){
var dailog = document.getElementById('login');
dailog.open();
}
</script>
哪些瀏覽器您使用的不是一個功能? –
使用谷歌瀏覽器 – Ravikanth