<script>
var tmp = new String("asdfasd");
alert(tmp);
</script>String可以那么写,是因为它可以这样<script>
var tmp = new Form();
alert(tmp);
</script>但是form不可以这样,因为它是已经封装了的ACTIVEX
var tmp = new String("asdfasd");
alert(tmp);
</script>String可以那么写,是因为它可以这样<script>
var tmp = new Form();
alert(tmp);
</script>但是form不可以这样,因为它是已经封装了的ACTIVEX
没有解的,放弃吧。
<input type=button value=ok onclick="myForm.post();">
</form>
<script>
function MyForm(obj)
{
this.thisForm = obj;
this.post=postfun
function postfun()
{
alert('已经将您的设置发送。共有元素'+this.thisForm.elements.length+'个');
return true;
}
}
var myForm=new MyForm(document.frm);
</script>