亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

代碼
提交代碼
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JavaScript實現全排列</title> <script type="text/JavaScript"> function combine() {//點擊按鈕向webworker線程發送請求 var worker = new Worker('http://wiki-code.oss-cn-beijing.aliyuncs.com/html5/js/worker.js'); worker.postMessage(document.getElementById("str").value); worker.onmessage= function (event) { document.getElementById("result").innerHTML = event.data ; //監聽JavaScript線程的結果 }; } </script> </head> <body> <input type="text" id="str" /> <button onclick="combine()">全排列</button> 結果是:<div id="result" style="width:500px;height:500px;word-break: break-all;"></div> </body> </html>
運行結果