超棒的vue跨平台前端基础框架vue-admin-beautiful分享,适合学习,找工作,同时兼容手机,电脑,平板完全开源免费
演示地址:
http://chu1204505056.gitee.io/vue-admin-beautiful
演示地址2:
http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful/
源码地址:
https://github.com/chuzhixin/vue-admin-beautiful
欢迎star
超棒的vue跨平台前端基础框架vue-admin-beautiful分享,适合学习,找工作,同时兼容手机,电脑,平板完全开源免费
演示地址:
http://chu1204505056.gitee.io/vue-admin-beautiful
演示地址2:
http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful/
源码地址:
https://github.com/chuzhixin/vue-admin-beautiful
欢迎star超棒的vue跨平台前端基础框架vue-admin-beautiful分享,适合学习,找工作,同时兼容手机,电脑,平板完全开源免费
演示地址:
http://chu1204505056.gitee.io/vue-admin-beautiful
演示地址2:
http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful/
源码地址:
https://github.com/chuzhixin/vue-admin-beautiful
欢迎star超棒的vue跨平台前端基础框架vue-admin-beautiful分享,适合学习,找工作,同时兼容手机,电脑,平板完全开源免费
演示地址:
http://chu1204505056.gitee.io/vue-admin-beautiful
演示地址2:
http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful/
源码地址:
https://github.com/chuzhixin/vue-admin-beautiful
欢迎star超棒的vue跨平台前端基础框架vue-admin-beautiful分享,适合学习,找工作,同时兼容手机,电脑,平板完全开源免费
演示地址:
http://chu1204505056.gitee.io/vue-admin-beautiful
演示地址2:
http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful/
源码地址:
https://github.com/chuzhixin/vue-admin-beautiful
欢迎star
I have a map of map in JS something like < Boolean , <StartDate, EndDate> >
On being given a date, I have to return the boolean value corresponding to the period it belongs to.
statusFlagMap = < Boolean , <StartDate, EndDate> >
checkFlagValueForDate(date) {
return the Boolean Value from statusFlagMap corresponding to the period the inputted date belongs to
}
Not able to get how to resolve this, can anybody help with this if there is any straight-forward way
I am open to updating the Object type of statusFlagMap
from map of map to something else also.
function searchElement (query) {
var result = searchFunctionalityData.filter( word => {
var regex = new RegExp(`^${query}`, 'gi');
return word.name.match(regex);
});
if(query.length === 0) {
result = [];
document.getElementById("searchResultsID").innerHTML = '';
}
outputHtml(result);
};
_
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<script type="text/javascript" src="js/html2canvas.js"></script>
<script src="js/jquery-2.1.1.min.js"></script>
<style>
.info { background: #ffff66; }
</style>
</head>
<body>
<input type="button" id="btn" value="点击我"/>
<input type="button" id="delAll" value="删除全部绑定函数"/>
<input type="button" id="delFun2" value="删除第二个绑定函数"/><br/>
<div class="info"></div>
<script type="text/javascript">
$(document).ready(function() {
// 为id为btn的按钮添加绑定事件
$("#btn").bind('click',
fun1 = function() {
$(".info").append('<p>绑定函数1</p>');
}).bind('click',
fun2 = function() {
$(".info").append('<p>绑定函数2</p>');
}).bind('click',
fun2 = function() {
$(".info").append('<p>绑定函数22</p>');
}).bind('click',
fun2 = function() {
$(".info").append('<p>绑定函数222</p>');
}).bind('click',
fun3 = function() {
$(".info").append('<p>绑定函数3</p>');
});
$("#delAll").bind('click',
function() {
$("#btn").unbind(); //删除全部绑定事件
});
$("#delFun2").bind('click',
function() {
$("#btn").unbind('click', fun2); //删除第二个绑定函数
});
})
</script>
</body>
</html>
$(document).ready(function () {
// Limite caratteri settabile da pannello amministrazione
const max = app.forum.attribute('Lenght');
$('.Post-body').each(function () {
var str = $(this).text();
if ($.trim(str).length > max) {
var subStr = str.substring(0, max);
var hiddenStr = str.substring(max, $.trim(str).length);
var ReadMore = app.translator.trans('flarum-ext-readmore.forum.readmore');
$(this).empty().html(subStr);
$(this).append(' <a href="javascript:void(0);" class="linkReadMore">' + ReadMore + '</a>');
$(this).append('<span class="addText">' + hiddenStr + '</span>');
}
});
$('.linkReadMore').click(function () {
$(this).siblings('.addText').contents().unwrap();
$(this).remove();
Good morning guys!
Can you please help me with the following challenge ? I've created a form where I am basing the validation on the html attribute. Can anyone help me move the validation to JS file ?
$(".Post-body").find('a').not(".linkpreview").each((i, e) => {
$('.Post-body').attr('id', 'value');
const isMobile = navigator.userAgentData.mobile;
let controller = new AbortController();
let href = e.getAttribute("href");
console.log(href)
if (isMobile === false) {
fetch(`myurl=` + encodeURIComponent(href), {
method: "GET",
mode: "cors",
signal: controller.signal,
credentials: "omit"
})
.then((res) => res.json())
.then((response) => {
console.log(response)
if (!e.text.startsWith("http")) return;
let $s = $('#value a')
let imgResp = '<img class="screenImg" src="' + response.image + '" width="250">';
if (response.image === undefined) {
imgResp = '<img class="screenImg" src="https://www.studioippocrate.com/wp-content/uploads/2017/11/pac-404.png" width="250">';
}
$s.html('<a href="' + href + '" target="_blank" class="titleLink">' + href + '</a>' + '<div class="dropdown-prev">\n' +
' <button class="dropbtn"><i class="fas fa-search"></i></button>\n' +
' <div class="dropdown-content-prev">\n' +
' <div class="donContainer">\n' +
' ' + imgResp + '' +
' <div class="titleDesc">' + response.description + '</div> ' +
' </div>\n' +
' </div>\n' +
'</div>');
e.replaceAll($s[0]);
console.log($s)
controller.abort();
});
}
});