版本: 1.自定义管道: example: 定义一个*ngFor 可以获取key值的管道 keyObject.pipe.ts // key value 管道 import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'getKeys' }) export class keyValue implements PipeTransform { transform(value, args: string[]): any { le…
我们知道,Vue.js的核心是数据驱动,当数据有所变化时,DOM就会被更新,比如: <span v-text="msg"></span> export default { data(){ return{ msg : 'oldMsg' } } methods : { changeMsg : function(){ this.msg = 'newMsg' } } } 当调用了changeMsg方法,msg被修改为 ' newMsg ' ,我们可以把这次修改理解为数据…
<template> <div id="topInfo" ref="topInfo" style="width: 200px;height: 200px;background-color: #0bb20c"> <img id="imgInfo" ref="imgInfo" src="./20151205231902_xe2kG.jpeg" alt="…
$('#domid').attr('acitve') $('#domid').prop('checked') // 在使用JQUERY获取DOM元素的属性时,有两个函数,attr 和 prop <a id="domid" href="cnblogs.com" checked="1" active="1">博客园</a> // 取得href属性的值 $('#domid').prop('href') //…
现定义一个方法 DIYConfigHelper.cs using System; using System.Xml; using System.Configuration; using System.Reflection; using System.Web; using System.IO; namespace Chain.Common { /// <summary> /// Summary description for ReadWriteConfig. /// </summary&g…
第一节: Jsoup 获取 DOM 元素属性值 Jsoup获取DOM元素属性值 比如我们要获取博客的href属性值: 我们这时候就要用到Jsoup来获取属性的值 : 我们给下示例代码: package com.javaxk.jsoup; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.metho…
1.父组件 select_li.vue 1.1 父组件模板 <template> <div id='selectLi' ref="selectLi"> <div class="sort" @click="choose"> <span>{{name}}</span> <img class="icon_arrow" :src="src">…
获取get值: <body>        <form action="9.26获取get值.html" method="get">            <input type="text" name="t1" />            <input type="text" name="t2" />            <inp…
过滤器 vue允许自定义过滤器,我个人认为,过滤器有两种,一种是对数据的清洗过滤,一种是对数据切换的动画过滤 数据切换的动画过滤 这里还是利用前面的动态组件的例子: 这里由于没办法展示动画效果,代码如下,自己体会吧: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> .v-enter, .v-leav…
虽然现在前端框架已经很多,尤其是几大流行框架,比如Vue,React,Angular 等,已经去DOM化,但是还是有很多公司仍在使用 HTML + CSS + JS . 这里记载一下用到的HTML传参 问题. 一.页面之间传参: HTML 页面跳转可以直接通过,给 href 赋值 $(document).on('click', '.detail', function() { window.location.href = 'scorePage.html' }) ? 传参 $(document).o…