<div class="htmlarea"> <textarea id="runcode65630"> <script> function FStr(oStr,Num){ for(var i=0 ;i<Math.pow(oStr.length,Num);i++){ var x=i document.write(i+":") for(var j=0;j<Num;j++){ document.write(oStr.substr((x%oStr.length),1)) x=parseInt(x/oStr.length) } document.write(" ") } } FStr("abcdefs",3) </script> </textarea><br><input onclick="runEx('runcode65630')" type="button" value="运行代码"> <input onclick="doCopy('runcode65630')" type="button" value="复制代码"> <input onclick="doSave(runcode65630)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>