核心提示:HTML基础知识url地址的构成:简单了解部分内容:query是地址中?开始的部分,比如https://domain.com/?search=a#hash;中,就是地址中的search字段。 quer...
HTML基础知识
url地址的构成:
简单了解部分内容:
query是地址中?开始的部分,比如https://domain.com/?search=a#hash;中,就是地址中的search字段。 queryStrng.parse(window.location.search),是node下发啊,表示将获取到的url中的字段转换成对象,但是它不继承js中的对象的方法。 https://local.haitou.cc:3009/?room=27&type=1&group_id=135924,中,window.location.search的内容就是?room=27&type=1&group_id=135924;也就是query。 html5中全屏事件,requestFullScreen;在html中使用在html中利用WScript.Shell启用本地程序.
if (typeof window.ActiveXObject !== "undefined") {
var wscript = new ActiveXObject("WScript.Shell");
if (wscript !== null) {
wscript.SendKeys("{F11}");
}
react设置元素的宽高直接refs获取去你元素,设置定位left或者top的值得时候,要获取到真实的元素。
jquery进行ajax骑请求,可以设置timeout的请示超时时间。毫秒:
$.ajax({
url: 'https://api.haitou.cc/edu/web-lesson-view',
type: 'GET',
timeout: 1000, //超时时间设置,单位毫秒
data: { "id": this.state.room },
success: function (obj_C) {
console.log(obj_C);
_this.setState({
play_url: obj_C.data.play_urls
}, ready_toplay)
}, error: function () {
console.log("web-lesson-view错误")
_this.setState({
play_url: {
"m3u8-raw": "https://cdn4.haitou.cc/edu/" + _this.state.room + ".m3u8",
"rtmp-raw": "rtmp://cdn4.haitou.cc/edu/" + _this.state.room
}
}, ready_toplay)
}
});
html中的canvas,中的context.setTransform(a,b,c,d,e,f);
| 参数 | 描述 |
|---|---|
| a | 水平旋转绘图 |
| b | 水平倾斜绘图 |
| c | 垂直倾斜绘图 |
| d | 垂直缩放绘图 |
| e | 水平移动绘图 |
| f | 垂直移动绘图 |
个浏览器全屏兼容方案:
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
if (requestMethod) {
requestMethod.call(element);
} else if (typeof window.ActiveXObject !== "undefined") {
var wscript = new ActiveXObject("WScript.Shell");
if (wscript !== null) {
wscript.SendKeys("{F11}");
}
}
}


