😅Sử dụng Object.assign và để copy dữ liệu, edit, input, form (ok)

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    document.body.appendChild(Object.assign(document.createElement('p'), {
      textContent: 'Pluto is no longer considered a planet. (Check you console for more information).'
    }))
  </script>
</body>
</html>

Last updated

Was this helpful?