前端
快乐风男111
fdd
展开
-
JS控制音乐播放
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title></title> </head> <body> 音乐 <audio src="C:\Users\Administrator\Mus原创 2021-06-05 07:05:04 · 3364 阅读 · 0 评论 -
React 从入门到精通 (页面跳转、刷新及获取网络状态)
// 页面跳转 window.location.href = 'www.baidu.com' // 页面刷新 window.location.reload() // 获取当前网络状态,只能判断用户电脑有没有断网(包括无线和有线),有网为true,没有网为false navigator.onLine ...原创 2019-12-18 09:32:42 · 838 阅读 · 3 评论 -
React从入门到精通 (点击事件传参数 两种)
1、之前的bind绑定this 2、ES6箭头函数绑定this原创 2019-12-17 08:54:06 · 112 阅读 · 0 评论 -
使用react——解决this.props.history.push无法跳转的问题
一个组件中,含有ul展开数组的组件,在每一行中,都能点击相应的这一行,跳转到对应的页面。 也就是说,组件套组件,子组件中this.props.history.push无法工作。提示没有push这个函数。 因为这时的props中没有history这个属性。 解决办法: 在父组件中,传递一个history。 子组件中用history.push 就可以啦 ...原创 2019-12-02 14:13:55 · 6417 阅读 · 0 评论 -
html中图片标签显示不出网络上的图片解决办法
1、显现描述 今天在写网页的时候,为有个标签,引用了网络上的图片,可是显示不了。 <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> **<meta name="referrer" content="no-referrer">** &l...原创 2019-12-02 13:08:26 · 3444 阅读 · 0 评论