<div class="htmlarea"> <textarea id="runcode76461"> <title>양식의 발송 주소를 무작위로 설정</title> <form name="form1" onsubmit="send(this)"> <input type="text" name="name"> 이름: <input type="submit" value="发送"> </form> </textarea> <br><input onclick="runEx('runcode76461')" type="button" value="运行代码"><input onclick="doCopy('runcode76461')" type="button" value="复制代码"> <input onclick="doSave(runcode76461)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 모두 선택 참고: </a>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 </div>]<script language="javascript"> <!-- function send(form){ url = new Array(); url[0] = "http://www.yahoo.com"; url[1] = "http://www.google.com"; url[2] = "http://www.baidu.com"; i = Math.random() * url.length; i = Math.floor(i); form.action = url[i]; alert("发送表单的地址为:"+form.action); } --> </script>