2012-10-31 46 views
0

后提交我的形式,并返回到页面上,这并提交显示器不需要文字“不确定”的领域:为什么此字段未定义?

enter image description here

我怎么能失去文本“未定义”?我完全没有做任何事情让它出现。这是HTML:

<span class="small60">Nummer: 
<input onkeypress="javascript:searchWithEnter('Oversikt','fastsearch')" 
     title="<%=mouseOverFast %>" type="text" size="40" name="fastsearch"> 

的脚本:

function searchWithEnter(action, command) { 
    if (window.event && window.event.keyCode == 13) { 
     document.actionForm.action.value = 'Oversikt'; 
     document.actionForm.actionCommand.value = 'fastsearch'; 
     document.actionForm.submit(); 
     disableAll(); 

    } 
} 
+3

你是如何填充输入的? – Oded

+1

显示JS代码'searchWithEnter'可能会为'this.value'指定某些内容,但它指定的内容可能是'undefined' –

+1

发布您的searchWithEnter()函数..以便我们可以帮助 – bipen

回答

1

searchWithEnter尝试与未定义的变量设置的字段的值。

编辑:我没有看到输入的值属性。

+4

你在这里做了一个巨大的假设,没有看到任何代码。这是一个合理的教育猜测,但就是这样。 – Oded