我希望为用户提供在数据库中搜索用户的能力,并且在选择时它将显示有关用户的各种信息。
到目前为止,我头脑风暴的内容如下:
<script type="text/javascript">
$(document).ready(function() {
Parse.initialize("ID", "ID");
$('#userIDSearch').bind("submit", function (e) {
});
</script>
<form id="userIDSearch">
<input type="search" name="usersearch">
<input type="submit" value="search">
</form>
不确定接下来该做什么,并希望得到指导。在此先感谢。\
更新
<script type="text/javascript">
$(document).ready(function() {
Parse.initialize("ID", "ID");
var currentUser = user;
query.equalTo("objectId", request.params.userId); // find user with this ID
function searchu() {
var user_search = $('#searchusertext').val();
var query = new Parse.Query(User);
query.find({
success: function(results) {
// results is an array of Parse.Object.
},
error: function(error) {
// error is an instance of Parse.Error.
}
});
$('#userIDSearch').bind("submit", function (e) {
});
</script>
<form id="userIDSearch">
<input type="search" id="searchusertext" name="usersearch">
<input type="submit" id="searchuserbutton" value="search">
</form>
答案 0 :(得分:1)
接下来的步骤是:
如果没有足够的指导,请告诉我。