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

鍍金池/ 問答/ HTML5問答
互擼娃 回答

它這個(gè)是在壓縮完成后的js文件有語法錯(cuò)誤

單眼皮 回答
修改答案,使用jquery遍歷tr
js的.addEventListener事件在jquery是.on這個(gè)。

getElementById("t").addEventListener("mouseover", function()
改成
$("#t tr").on("mouseover",function()

<script type="text/javascript">
$("#t").find("tr").each(function(){//遍歷tr
$("#t tr").mouseover(function(){//mouseover事件
var index = $("#t tr").index(this);
console.log("第"+ index +"個(gè)tr");
});
});
</script>

圖片描述

參考代碼。效果截圖
<script type="text/javascript">
document.getElementById("t").addEventListener("mouseover", function(){
        if(this.getElementsByTagName("td")){
        console.log("1")
    };
            if(this.getElementsByTagName("tr")){
        console.log("2")
    };
                if(this.getElementsByTagName("table")){
        console.log("3")
    };
//    if (e.target.nodeName.toLowerCase() == "td") {
//        console.log("1");
//    };
//    if (e.target.nodeName.toLowerCase() == "tr") {
//        console.log("2");
//    };
//    if (e.target.nodeName.toLowerCase() == "table") {
//        console.log("3");
//    }
}, false)
</script>

圖片描述

膽怯 回答

element-ui有網(wǎng)格布局
element-ui 畢竟是pc項(xiàng)目 可能對移動(dòng)端兼容不是很好

iview 建議了解一下
https://www.iviewui.com/

很可能的原因就是,你的這段定時(shí)器代碼第二次打開時(shí)屬于重復(fù)聲明??梢栽倜看温暶髑跋日堃幌露〞r(shí)器id

clearInterval(id) ;
id = setInterval(function(){},1000);
妖妖 回答

最簡單的 假如要執(zhí)行一個(gè) settimeout 設(shè)置的函數(shù) 用箭頭函數(shù) this指向的就是settimeout外層的環(huán)境 而不使用剪頭函數(shù) this 指向全局環(huán)境。最常用的就是使用剪頭函數(shù)改變this指向

別瞎鬧 回答

肯定是快速點(diǎn)擊的時(shí)候觸發(fā)了代碼里的啥bug了,調(diào)試一下看看

陌如玉 回答

1、只清除登錄相關(guān)的store
2、不要清空store,而是用默認(rèn)值去覆蓋

放開她 回答

inline-block:是使元素以塊級元素的形式呈現(xiàn)在行內(nèi),你的寬度分配雖然剛好把100%分完,但是div之間有“幽靈空白點(diǎn)”,在outer中,添加font-size:0就可以了, 子div可以重新設(shè)置font-size:12px;

愛礙唉 回答

使用.bind(this)綁定上下文

撿肥皂 回答

寫個(gè)按鈕定位在input的上面,點(diǎn)擊按鈕使input的獲取焦點(diǎn)獲取input的值并移除input添加新的input標(biāo)簽,再根據(jù)判斷附上獲取的值,再次獲取焦點(diǎn)。

html代碼:
<button id="btn"></button>
<div class="box">
    <input type="text" maxlength="4" id="hengpi"/>
</div>
js代碼:
$('#btn').on('touchstart', function() {
    $('input').focus()
    var value = $('input').val()
    $('input').remove()
    $('.box').html('<input type="text" maxlength="4"/>')
    if(value!=''){
        $('input').val(value)
    }
    $('input').focus()
})
久愛她 回答

這里只是單純的表明這個(gè)模板變量的類型

久舊酒 回答

@Terry github上有對應(yīng)的組件可以用,

請參考 ngx-ueditor

爛人 回答

1 .then 發(fā)生在獲取數(shù)據(jù)之后, 無需使用async await

2 獲取res 后 取值 可以直接 使用簡寫使用點(diǎn)語法 res.data

3 api 中 已經(jīng)轉(zhuǎn)換成 promise 后 resolve(數(shù)據(jù)) reject(cache Error) 無需強(qiáng)制轉(zhuǎn)成 同步

喵小咪 回答

一般我們講生命周期: 如 React 中生命周期,這是由框架定義的。其他框架也有類似定義。 單獨(dú)講,鉤子函數(shù)就是鉤子函數(shù)。

在前端而言,頁面也會(huì)有生命周期: contentLoaded,loaded, unloaded 等這些。

柒喵 回答

你在html里寫了ng-controller,js里沒有注冊,例如這樣:

webapp.controller("NewsController", ["$scope", function($scope) {
    $scope. news = [];
}])