<form name=form2></form>
<script language="JavaScript">
<!--
if(document.form1)alert('here')
else alert('not here')
if(document.form2)alert('here')
else alert('not here')
//-->
</script>
<script language="JavaScript">
<!--
if(document.form1)alert('here')
else alert('not here')
if(document.form2)alert('here')
else alert('not here')
//-->
</script>
<!--
if(document.form1)alert('form1 exist')
else alert('form1 not exist')
//-->
</script>nolonely兄有些画蛇添足了。
<!--
if(document.form1)alert('ok')
else alert('no ok')
//-->
</script>
alert(document.form1);
</script>
if(document.form1)alert('form1 exist')
else alert('form1 not exist')
</script>
<!--
if(document.form1)alert('存在!')
else alert('不存在!')
//-->
</script>