日期:2014-05-16  浏览次数:20454 次

一个关于变量的简单问题(在线)
<script   language= "javascript ">
var   txt_price   =   document.getElementById( "txt_price ");//单价
function   original1()
{
    txt_price.value   =   "300 ";
}

function   original2()
{
    txt_price.value   =   "400 ";
}
</script>

1.这样写为什么提示缺少对象  
2.应如何解决  
多谢!

------解决方案--------------------
简单的顺序问题...