目前我在使用 jquery 表单插件时遇到问题。部分原因是我需要更改表单提交的哈希值。这是我在做什么的基础:
$(document).ready(function() {
$('#search').ajaxForm({
target: '#pageContent',
success: function() {
$('#pageContent'); //this is all i need to 'ajaxify' this form
var hash = 'query='+encodeURI(document.getElementById('query').value);
window.location.hash = hash;
}
});
});
现在发生的事情是我能够更改哈希值,但我的表单不再是“ajaxify”本身,而是我只是得到一个空白页..
我究竟做错了什么?