我已经创建了文本框,在提交时我能够获得 123 个值,这很好。当我在文本框中输入新值 (567) 并提交值时,我能够在 View 中看到更改。但仍然文本框显示 123,而不是 567。
@using (Html.BeginForm())
<input type ="text" name = "id" value="123" />
<input type="submit" value="Submit"/> </p>
}
最佳答案
提交成功需要更新textbox的value属性
document.getElementByName("id").value = your_updated_value;
关于html - 加载时更改的默认文本框值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26836590/