第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

寫了一個(gè)js文件,函數(shù)加載進(jìn)去了,但是里面的函數(shù)不執(zhí)行,是什么原因

寫了一個(gè)js文件,函數(shù)加載進(jìn)去了,但是里面的函數(shù)不執(zhí)行,是什么原因

一個(gè)·用來處理json數(shù)據(jù)的js文件,傳過來的json數(shù)據(jù)是{"infos":[{"id":402881e9564b22f701564b251aef0001,"title":"火影","publishingTime":"2016-08-02?20:05:38.0","isEditable":"true"},{"id":402881e9565a7f3601565a86f0c30001,"title":"龍珠","publishingTime":"2016-08-05?19:46:48.0","isEditable":"true"},{"id":402881e9565a7f3601565a8720ac0002,"title":"哈哈","publishingTime":"2016-08-05?19:47:00.0","isEditable":"true"},{"id":402881e9565a7f3601565a87464b0003,"title":"海賊","publishingTime":"2016-08-05?19:47:10.0","isEditable":"true"},{"id":402881e9565a7f3601565a87b47c0004,"title":"海賊王","publishingTime":"2016-08-05?19:47:38.0","isEditable":"true"}],"pageBean":{"pageSize":5,"currentPage":1,"totalPage":1,"hasPrevious":false,"HasNext":false}}處理json數(shù)據(jù)的文件是? var?pageIndex?=?1;//首頁????????????????$(function?()?{????????????????????????????????????ajaxGetListData(pageIndex);????????});???????????//ajax獲取列表function?ajaxGetListData(index)?{????$.ajax({????????url:?"getFirstInfoList.action",????????type:?"Post",????????data:?"page="?+?index,????????dataType:?"json",????????success:?function?(data)?{????????????var?htmlStr?=?"";????????????htmlStr?+=?"<table?class='tab-list'?width='99%'>";????????????htmlStr?+=?"<thead>";????????????htmlStr?+="<tr?class='list-header'>" +"<td?width='5%'>序號</td>" +"<td?width='30%'>用戶ID</td>" +"<td?width='20%'>標(biāo)題</td>" +"<td?width='20%'>創(chuàng)建時(shí)間</td>" +"</tr>";????????????htmlStr?+=?"</thead>";????????????htmlStr?+=?"<tbody>";????????????for?(var?i?=?0;?i?<?data.infos.length;?i++)?{????????????????htmlStr?+=?"<tr>";????????????????htmlStr?+=?"<td>"?+?(i+1)?+?"</td>"???????????? +?"<td>"+?data.infos[i].id?+?"</td>" +?"<td>"+?data.infos[i].title+?"</td>" +"<td>"+?data.infos[i].publishingTime+?"</td>";????????????????htmlStr?+=?"</tr>";????????????}????????????if(data.infos.length==0){???????????? htmlStr?+=?"<tr?style='text-align:?center'><td?colspan='6'><font?color='#cd0a0a'>"+?'暫無記錄'?+?"</font></td></tr>";???? }????????????htmlStr?+=?"</tbody>";????????????htmlStr?+=?"<tfoot>";????????????htmlStr?+=?"<tr>";????????????htmlStr?+=?"<td?colspan='3'?style='text-align:?left;border-right:?0px;'>";????????????htmlStr?+=?"<font?color='grey'>顯示";??????????????????????htmlStr?+=?"<span>每頁"?+?data.pageBean.pageSize?+?"條記錄_共<span?id='count'>"?+?data.pageBean.totalPage+?"</span>頁_"+"當(dāng)前第"+data.pageBean.currentPage+"頁"?+?"</span></font>";????????????htmlStr?+=?"</td>";????????????htmlStr?+=?"<td?colspan='3'?style='text-align:?right;border-left:?0px;'>";???????????????????????if(data.pageBean.currentPage?>?1){???????????? ?htmlStr?+=?"<a?href='javascript:void'?onclick='GoToFirstPage()'?id='aFirstPage'?>首????頁</a>&nbsp;&nbsp;?";????????????}else{???????????? htmlStr?+=?"<font?color='grey'>首????頁</font>&nbsp;&nbsp";????????????}????????????????????????if((data.pageBean.currentPage?-?1?)?>?0?){???????????? htmlStr?+="<a?href='javascript:void'?onclick='GoToPrePage()'?id='aPrePage'>上一頁</a>&nbsp;&nbsp";?????????????}else{???????????? htmlStr?+="<font?color='grey'>上一頁</font>&nbsp;&nbsp"; ?????????????}????????????????????????if((data.pageBean.currentPage+1)?>?data.pageBean.totalPage){???????????? ?htmlStr?+=?"<font?color='grey'>下一頁</font>&nbsp;&nbsp;";????????????}else{???????????? ??htmlStr?+=?"<a?href='javascript:void'?onclick='GoToNextPage()'?id='aNextPage'>下一頁</a>&nbsp;&nbsp;";????????????}????????????if(data.pageBean.currentPage?<?data.pageBean.totalPage){???????????? htmlStr?+=?"<a?href='javascript:void'?onclick='GoToEndPage()'?id='aEndPage'?>尾????頁</a>&nbsp;&nbsp;?";????????????}else{???????????? htmlStr?+=?"<font?color='grey'>尾????頁</font>&nbsp;&nbsp";????????????}????????????????????????htmlStr?+=?"<input?id='pageNum'?name='pageNum'?class='input-page'?type='text'?/><input?type='button'??value='跳轉(zhuǎn)'?onclick='GoToAppointPage(this)'?style='width:?60px;?height:?25px;font-size:?12px;'/>?";????????????htmlStr?+=?"</td>";????????????htmlStr?+=?"</tr>";????????????htmlStr?+=?"</tfoot>";????????????htmlStr?+=?"</table>";????????????$("#divSearchResult").html(htmlStr);????????}, error:?function?(XMLHttpRequest,?textStatus,?errorThrown)?{????????????????????alert(XMLHttpRequest);????????????????????alert(textStatus);????????????????????alert(errorThrown);????????????????}????});?}????????//首頁????????function?GoToFirstPage()?{????????????pageIndex?=?1;????????????ajaxGetListData(pageIndex);????????}????????//上一頁????????function?GoToPrePage()?{????????????pageIndex?-=?1;????????????pageIndex?=?pageIndex?>=?0???pageIndex?:?0;????????????ajaxGetListData(pageIndex);????????}????????//下一頁????????function?GoToNextPage()?{????????????if?(pageIndex?<?parseInt($("#count").text()))?{????????????????pageIndex?+=?1;????????????}????????????????ajaxGetListData(?pageIndex);????????}????????//尾頁????????function?GoToEndPage()?{????????????pageIndex?=?parseInt($("#count").text());????????????ajaxGetListData(pageIndex);????????}????????//跳轉(zhuǎn)????????function?GoToAppointPage(e)?{????????????var?page?=?$(e).prev().val();????????????if?(isNaN(page))?{????????????????alert("請輸入數(shù)字!");????????????}????????????else?{????????????????var?tempPageIndex?=?pageIndex;//pageIndex==currentPage????????????????pageIndex?=?parseInt(page);????????????????if?(pageIndex?<?0?||?pageIndex?>?parseInt($("#count").text()))?{????????????????????pageIndex?=?tempPageIndex;????????????????????alert("請輸入有效的頁面范圍!");????????????????}else?{????????????????????ajaxGetListData(pageIndex);????????????????}????????????}????????}????2016/10/12?23:53:24放下?2016/10/12?23:53:24<%@?page?language="java"?contentType="text/?html;?charset=UTF-8"?pageEncoding="UTF-8"%><%@?taglib?prefix="s"?uri="/struts-tags"?%><%@?taglib?prefix="sd"?uri="/struts-dojo-tags"?%><%request.setCharacterEncoding("UTF-8");?%><!DOCTYPE?HTML?PUBLIC?"-//W3C//DTD?HTML?4.01?Transitional//EN"?"http://www.w3.org/TR/html4/loose.dtd"><html> <script?language="Javascript"?src="js/XMLHttpRequestFactory.js"></script> <script?language="Javascript"?src="js/Asynchronous.js"></script> <script?language="Javascript"?src="js/AjaxList.js"></script> <head> <s:head?theme="xhtml"?/> <sd:head?parseContent="true"?/> <meta?http-equiv="Content-Type"?content="text/?html;charset=UTF-8">???? ???? <title>社區(qū)主頁</title> </head> <body> <div>??????????????<input?type="text"?id="txtSearch"?/>??????????????<input?type="button"?id="btnSearch"?value="Search"?/>??????</div>??????<div?id="divSearchResult">??????????</div>?? </body></?html>經(jīng)過測試?yán)锩娴暮瘮?shù)就是不執(zhí)行,有可能是什么原因
查看完整描述

2 回答

已采納
?
一朵大白天

TA貢獻(xiàn)54條經(jīng)驗(yàn) 獲得超14個(gè)贊

看看console報(bào)的什么錯(cuò)誤?

查看完整回答
反對 回復(fù) 2016-10-15
?
一瞬兒光

TA貢獻(xiàn)178條經(jīng)驗(yàn) 獲得超70個(gè)贊

從來就沒有這么傳data的。

查看完整回答
反對 回復(fù) 2016-10-15
  • 2 回答
  • 0 關(guān)注
  • 3363 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號