在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/ HTML問(wèn)答
涼汐 回答

簡(jiǎn)寫(xiě)方式只是針對(duì) fn(){} => fn: function() {}你寫(xiě)方式引擎不認(rèn)識(shí)

莓森 回答

你在你的gulpfile文件里面把你的引入代碼壓縮的gulp插件和生成hash值的gulp插件的代碼注釋掉重新運(yùn)行g(shù)ulp就行了

不歸路 回答

不透明度為1不會(huì)有什么動(dòng)畫(huà)吧,而且點(diǎn)擊事件控制show的變化寫(xiě)了么

女流氓 回答
defer
This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded.
Scripts with the defer attribute will execute in the order in which they appear in the document.
此屬性對(duì)內(nèi)聯(lián)的JS腳本無(wú)效。
script的defer值的設(shè)置就是告訴瀏覽器,這個(gè)腳本將在DOM文件解析完成后DOMContentLoaded事件發(fā)生之前執(zhí)行。有defer屬性的script腳本按在HTML文件中出現(xiàn)的順序順序執(zhí)行。

async HTML5
This is a Boolean attribute indicating that the browser should, if possible, execute the script asynchronously.
Dynamically inserted scripts execute asynchronously by default, so to turn on synchronous execution (i.e. scripts execute in the order they were inserted) set async=false.
此屬性對(duì)內(nèi)聯(lián)的JS腳本無(wú)效
設(shè)置async屬性就是告訴瀏覽器如果有可能就異步執(zhí)行指定的JS腳本,動(dòng)態(tài)插入的腳本默認(rèn)是異步加載執(zhí)行的,除非手動(dòng)設(shè)置async=false

defer 延遲執(zhí)行,但會(huì)在DOMContentLoaded事件發(fā)生之前執(zhí)行完畢,defer腳本會(huì)順序同步的執(zhí)行。defer延遲是相對(duì)于整個(gè)文檔的解析來(lái)講,指的腳本的開(kāi)始加載的時(shí)間點(diǎn)。

async 異步執(zhí)行,具體什么時(shí)間點(diǎn)執(zhí)行由瀏覽器決定,具體的時(shí)間點(diǎn)不確定,但是確定會(huì)去加載執(zhí)行,設(shè)置了async的各個(gè)腳本加載執(zhí)行完畢的時(shí)間和它們放置插入的順序沒(méi)有確定的關(guān)系。和DOMContentLoaded事件發(fā)生也沒(méi)有確定的前后關(guān)系,可能在DOMContentLoaded事件前某個(gè)async腳本執(zhí)行完了,也有可能async腳本一個(gè)都沒(méi)有執(zhí)行。async指的是文檔的加載方式,同步的還是異步的,并不指定什么時(shí)候開(kāi)始加載。一般都會(huì)處理成在DOMContentLoaded事件發(fā)生后,就相當(dāng)于這些腳本是通過(guò)JS腳本動(dòng)態(tài)添加的

normal.js

console.log("normal loaded js");

defer.js

console.log("defer loaded js");

html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <script type="text/javascript" defer src="../js/defer.js"></script>
    <script type="text/javascript" src="../js/normal.js"></script>
    <title>Defer Script</title>
    <script>
        document.addEventListener("DOMContentLoaded", function(event) {
            console.log("DOMContentLoaded");
        });
    </script>
</head>
<body>

</body>
</html>

輸出

normal loaded js
defer loaded js
DOMContentLoaded

鼓搗半天,現(xiàn)在如下配置,能成功運(yùn)行。還在查資料ing

build/utils.js

...
function generateLoaders (loader, loaderOptions) {
    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]

    if (loader) {
      loaders.push({
        loader: loader + '-loader',
        options: Object.assign({}, loaderOptions, {
          sourceMap: options.sourceMap
        })
      })
    }

    // Extract CSS when that option is specified
    // (which is the case during production build)
    if (options.extract) {
      return ExtractTextPlugin.extract({
        use: loaders,
        publicPath: '../../',         // 解決css的字體圖標(biāo)無(wú)法找到的問(wèn)題
        fallback: 'vue-style-loader'
      })
    } else {
      return ['vue-style-loader'].concat(loaders)
    }
  }
...

build/webpack.base.conf.js

'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
var webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')

function resolve (dir) {
  return path.join(__dirname, '..', dir)
}



module.exports = {
  context: path.resolve(__dirname, '../'),
  entry: {
    app: './src/main.js',
  },
  plugins: [
    new ExtractTextPlugin({filename: "main.css", allChunks: true}), //抽離成一個(gè)單獨(dú)的css
    new webpack.ProvidePlugin({
      $: "jquery",
      jQuery: "jquery",
      "windows.jQuery": "jquery"
    })
    
  ],
  output: {
    path: config.build.assetsRoot,
    filename: '[name].js',
    publicPath: process.env.NODE_ENV === 'production'
      ? config.build.assetsPublicPath
      : config.dev.assetsPublicPath
  },
  resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      'vue$': 'vue/dist/vue.esm.js',
      '@': resolve('src'),
    }
  },
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: vueLoaderConfig
        // options: {loaders:{
        //   css: ExtractTextPlugin.extract({
        //       use: 'css-loader',
        //       fallback: 'vue-style-loader'
        //   })
        // }}
      },
      {
        test: /\.js$/,
        loader: 'babel-loader',
        include: [resolve('../src'), resolve('test')]
      },
      {
        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('img/[name].[hash:7].[ext]')
        }
      },
      {
        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('media/[name].[hash:7].[ext]')
        }
      },
      {
        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
        }
      }
    ]
  },
  node: {
    // prevent webpack from injecting useless setImmediate polyfill because Vue
    // source contains it (although only uses it if it's native).
    setImmediate: false,
    // prevent webpack from injecting mocks to Node native modules
    // that does not make sense for the client
    dgram: 'empty',
    fs: 'empty',
    net: 'empty',
    tls: 'empty',
    child_process: 'empty'
  }
}
擱淺 回答

!flag是取反,不是置反

flag=!flag;可以
咕嚕嚕 回答

HTML5 中的 button 里可以放圖像,看手機(jī)是否支持 HTML5

萌二代 回答

不是代碼問(wèn)題 可以問(wèn)問(wèn)運(yùn)維 這和網(wǎng)絡(luò)有關(guān)系

墨小羽 回答

form 表單需要阻止提交按鈕的默認(rèn)行為

你好胸 回答

沒(méi)有仔細(xì)看代碼,解決方案:

 input.on('keypress',function(event) {.....

把on前面加個(gè)解綁事件

input.off().on('keypress',function(event) {.....

可能有事件外面有循環(huán),先把事件解綁,在進(jìn)行添加就可以了,請(qǐng)采納

清夢(mèng) 回答

d.ts文件就是作為你的一些復(fù)合類(lèi)型、類(lèi)、函數(shù) 其行為的約定。
用來(lái)告訴其他人,這個(gè)函數(shù)的簽名是什么,返回值是什么。
這個(gè)類(lèi)提供了什么方法,我可以拿它來(lái)做什么事情。

可以理解為是說(shuō)明書(shū)吧。

下墜 回答

.vue文件準(zhǔn)確的說(shuō)是一個(gè)單文件組件,其中包括了template(html部分),script(vue腳本部分)和style(css/less樣式部分),所以單純的把.vue變成.js是不太合理的。單純的把里面的腳本部分拿出來(lái),可能也需要依賴一些其他的東西。

念舊 回答

你操作最最好先判斷data的類(lèi)型 slice方法為undefined 說(shuō)明它不是個(gè)數(shù)組
或者你和后臺(tái)約定好 只要不是error 返回值都是數(shù)組

笨小蛋 回答

你用js獲取一下點(diǎn)擊事件,然后重寫(xiě)他,或者讓他失效吧
jquery移除、綁定、觸發(fā)元素事件使用示例詳解

怣痛 回答

str === 'true'
或者
str === 'true' ? true : str === 'false' ? false : '我也不知道是什么鬼'