<script language=javascript>
function checkPressDown(){
if(button1.value="sure"){
alert("sure");
}
}
</script><body><input type=button id=button1 name=button1 value="sure"></body>
function checkPressDown(){
if(button1.value="sure"){
alert("sure");
}
}
</script><body><input type=button id=button1 name=button1 value="sure"></body>
<input type=button name=gua onclick="flag=0">
<script>
if (flag==0)
alert("already pressed");
</script>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<input type=button name=test onclick='checkWho(this)' value='click me'>
<script>
function checkWho(it){
o=document.all("test");
for(i=0;i<o.length;i++){
if(it.sourceIndex==o[i].sourceIndex){
alert("i am is the "+i+1);
}
}
}
</script>
同时也谢谢木子园和瓜瓜