I have this code to search someone in my database :
<script type="text/javascript">
$(function () {
$('#search').click(function () {
$mvc.jssearchNational.search({ nationalCode: $("#karkonan_MelliCode").val() }).success(function (data) {
$("#searchres").replaceWith("<span id=searchres>" + data.message + "</span>");
});
});
});
</script>
I want after the successful search, load person info in page by jquery. is it anyone to bind model dynamically and refresh the page by jquery or I have to assign each field to my page's controls?
如果要使用绑定,请尝试看一下MVVM模式和KnockOutJS
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.