“miniLab”的版本间的差异

来自个人维基
跳转至: 导航搜索
(以“{{setlang|en}} <source lang="html5"> <!DOCTYPE html> <html> <head> <title>miniLab</title> </head> <body> <textarea id=codebox autocapitali...”为内容创建页面)
 
第26行: 第26行:
 
Data URL:
 
Data URL:
 
<pre style="white-space: pre-wrap; overflow-wrap: break-word;">
 
<pre style="white-space: pre-wrap; overflow-wrap: break-word;">
data:text/html;,%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3EminiLab%3C/title%3E%3C/head%3E%3Cbody%3E%3Ctextarea%20id=codebox%20autocapitalize=off%20spellcheck=false%20onblur=%22try%7Balert(eval(this.value))%7Dcatch(e)%7Balert(e)%7D%22style=%22width:100%25;height:25rem%22%3E%3C/textarea%3E%3C/body%3E%3C/html%3E
+
data:text/html;,<!DOCTYPE%20html><html><head><title>miniLab</title></head><body><textarea%20id=codebox%20autocapitalize=off%20spellcheck=false%20onblur=%22try%7Balert(eval(this.value))%7Dcatch(e)%7Balert(e)%7D%22%20style=%22width:100%25;height:25rem%22%3E%3C/textarea%3E</body></html>
 
</pre>
 
</pre>
  

2021年8月25日 (三) 12:10的版本

<!DOCTYPE html>
<html>
  <head>
    <title>miniLab</title>
  </head>
  <body>
    <textarea
      id=codebox
      autocapitalize=off
      spellcheck=false
      onblur="
        try {
          alert(eval(this.value))
        } catch (e) {
          alert(e)
        }"
      style="width: 100%; height: 25rem"
    ></textarea>
  </body>
</html>

Data URL:

data:text/html;,<!DOCTYPE%20html><html><head><title>miniLab</title></head><body><textarea%20id=codebox%20autocapitalize=off%20spellcheck=false%20onblur=%22try%7Balert(eval(this.value))%7Dcatch(e)%7Balert(e)%7D%22%20style=%22width:100%25;height:25rem%22%3E%3C/textarea%3E</body></html>

Snippets

myDiv

this.value = ""
window.text = document.body.appendChild(this.cloneNode())
window.myDiv = document.body.appendChild(document.createElement("div"))
text.onblur = function () { myDiv.innerHTML = text.value }
;[][[]]