js jq 一些属性
$(document).ready(function () { }); window.οnlοad=方法;頁面加載完觸發(fā)
var iWidth = 300; //窗口寬度 ?????????????? var iHeight = 200; //窗口高度???? ?????????????? var iTop = (window.screen.height - iHeight) / 2; ?????????????? var iLeft = (window.screen.width - iWidth) / 2; ?????????????? window.open(URL, 'newwindow', 'height=300,width=300,top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') ?修改頁面title document.title = "我的粉絲";
分割 split() 參數(shù):字符 var Str="2,2,3,5,6,6"; var Array= Str.split(','); indexof 查詢字符或字符串在字符串的位置,不存在則為-1 var str="Hello world!" document.write(str.indexOf("Hello") + "<br />") document.write(str.indexOf("World") + "<br />") document.write(str.indexOf("world")) 0 -1 6
jq獲取父級元素? parent()
Js childNodes 所有子節(jié)點(diǎn) parentNode 父節(jié)點(diǎn)
?
轉(zhuǎn)載于:https://www.cnblogs.com/huweijun/p/3880245.html
總結(jié)
以上是生活随笔為你收集整理的js jq 一些属性的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据中心产品化的蜕变
- 下一篇: golang - strings