当前位置: 代码迷 >> JavaScript >> 一个关于变量的简单有关问题(在线)
  详细解决方案

一个关于变量的简单有关问题(在线)

热度:98   发布时间:2012-04-01 17:23:46.0
一个关于变量的简单问题(在线)
<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.应如何解决  
多谢!

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