找到一个抽奖程序

码已经发了n次了,就是发不出来。就拿去用吧。

& lt!DOCTYPE?html & gt

& lthtml & gt

& lthead & gt

& ltmeta?charset=utf-8?/& gt;

& lttitle & gt随机数

& lt脚本& gt

功能?num(){

var?a = document . getelementbyid(" n 1 ")。价值;

var?a=document.getElementById("n2 ")。价值;

var?a=document.getElementById("n3 ")。价值;

var?a=document.getElementById("n4 ")。价值;

var?a=document.getElementById("n5 ")。价值;

var?a=document.getElementById("n6 ")。价值;

var?arr=[a,b,c,d,e,f];

document.getElementById("num ")。innerHTML?=?

arr[0]+"、"+arr[1]+"、"+arr[2]+"、"+arr[3]";}

& lt/script & gt;

& lt/head & gt;

& ltbody & gt

& lt输入?type="text "?name="num1 "?id="n1"/>

& lt输入?type="text "?name="num2 "?id = " N2 "/& gt;

& lt输入?type="text "?name="num3 "?id = " n3 "/& gt;

& lt输入?type="text "?name="num4 "?id="n4"/>

& lt输入?type="text "?name="num5 "?id="n5"/>

& lt输入?type="text "?name="num6 "?id="n6"/>

& lt按钮?onclick = " num()" & gt;提取

& ltbr/>;

& ltp?id = " num " & gt& lt/p & gt;

& lt/body & gt;

& lt/html & gt;