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

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

APP.templates = (function () {})這個(gè)結(jié)構(gòu)該怎么理解呢?

APP.templates = (function () {})這個(gè)結(jié)構(gòu)該怎么理解呢?

琦屹 2015-10-05 16:34:41
APP.templates = (function () {? ? 'use strict';? ? function application() {? ? }? ? function home() {? ? ? ? return '<button id="refreshButton">刷新新聞</button><div id="headlines"></div></div>';? ? }? ? function articleList(articles) {? ? ? ? var i, l, output = '';? ? ? ? if (!articles.length) {? ? ? ? }? ? ? ? for (i = 0, l = articles.length; i < l; i = i + 1) {? ? ? ? }? ? ? ? return '<ul>' + output + '</ul>';? ? }? ? function article(articles) {? ? ? ? }? ? ? ? return '<a href="#">回到首頁(yè)</a><h2>' + articles[0].headline + '</h2><h3>作者:' + articles[0].author + ' ,發(fā)表日期:' + articles[0].date + '</h3>' + articles[0].body;? ? }? ? function articleLoading() {? ? ? ? return '<a href="#">回到首頁(yè)</a><br /><br />Please wait&hellip;';? ? }? ? return {? ? ? ? application: application,? ? ? ? home: home,? ? ? ? articleList: articleList,? ? ? ? article: article,? ? ? ? articleLoading: articleLoading? ? };}());APP.templates = (function () {})這個(gè)結(jié)構(gòu)該怎么理解呢?為什么前面這個(gè)APP.templates不用審明呢?還有最下面的段:return {? ? ? ? application: application,? ? ? ? home: home,? ? ? ? articleList: articleList,? ? ? ? article: article,? ? ? ? articleLoading: articleLoading? ? };怎么理解呢?前后兩個(gè)(比如?application: application中前面和后面的)分別是什么意思呢?
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 1408 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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