MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

A simple demo of a live code sample

这篇翻译不完整。请帮忙从英语翻译这篇文章

The_example

This is a very simple example showing you how to do a live demo in MDN. For more information, see Live samples.

<form>
  <label>Try me<input type="text" name="name"></label>
  <input type="submit" value="go">
</form>
form {
  border-radius: 10px;
  background: powderblue;
}
var f = document.querySelector('form');

f.addEventListener('submit', function(ev) {
  ev.preventDefault();
  document.querySelectorAll('input')[1].value = 'sending';
}, false);

 

 

文档标签和贡献者

 此页面的贡献者: Howard.Chen
 最后编辑者: Howard.Chen,