javascript built-in functions Info

48. In the old browsers do not perform this JS :<!-- //-->
49. To quote a document-style JS: <script type="text/javascript" src="/blog/aaa.js"> </ script>
50. Specified in the script does not support the browser displays the HTML: <noscript> </ noscript>
51. When the hyperlink and the onClick event has, then the old version of your browser turned a.html, otherwise shift b.html.
Example: <a href="/blog/a.html"/blog/b.html";return false"> dfsadf </ a>
Built-52.JS object has:
Array, Boolean, Date, Error, EvalError,
Function, Math, Number, Object, RangeError, ReferenceError,
RegExp, String, SyntaxError, TypeError, URIError
53.JS in line: \ n
54. Window full-screen size:
<script> function fullScreen () (this.moveTo (0,0); this.outerWidth = screen.availWidth;
this.outerHeight = screen.availHeight;) window.maximize = fullScreen; </ script>
55.JS of all on behalf of its middle and lower classes of all elements
Medium 56.JS the focus of the order: document.getElementByid ( "form element"). TabIndex = 1
57.innerHTML values are the values of form elements:
Such as <p> "how are <em> you </ em>" </ p>, while the value of innerHTML is: how are <em> you </ em>
58.innerTEXT value and the same as above, but will not put <em> this tag is displayed.
59.contentEditable whether elements can be set can be modified, isContentEditable Return whether to modify state.
60.isDisabled determine whether to prohibit the state. Disabled prohibits state
61.length obtain the length of return integer values
62.addBehavior () is an external function call JS file their extension. Htc
63.window.focus () so that the current window before the window at all.
64.blur () refers to the loss of focus. With FOCUS () the opposite. () refers to elements selected.
66. To prevent users of text box text:

67. Remove the element on the page appear in quantity:
document.all.tags ( "div (or other HTML tags)"). length
Medium 68.JS output is divided into two forms: modal and modeless.
window.showModaldialog (), window.showModeless ()
69. The status bar language settings:
window.status = 'language', default language setting of the status bar: window.defaultStatus = 'characters.';
70. Add to Favorites:
external.AddFavorite ( "";, "meil");
71.JS encountered in the script will not do anything wrong steps:
window.onerror = doNothing; specified error handler for the grammar: window.onerror = handleError;
72.JS specified in the current window to open the parent window:
window.opener, Supporting multiple opener.opener ... continue.
73.JS of self refers to the current window
74.JS in the status bar display content: window.status = "content"
75.JS the top refers to the framework of centralized top-level framework
Medium 76.JS turn off the current window: window.close ();
77.JS made sure the box: if (confirm ( "Are you sure ?")){ alert (" ok ");) else (alert (" Not Ok ");)
78.JS redirect the window: window.navigate ( "";);
79.JS in print: window.print ()
80.JS prompted to enter in the box: window.prompt ( "message", "defaultReply");
81.JS scroll bar of the window: window.scroll (x, y)
Medium 82.JS window scroll down to the location: window.scrollby
83.JS set time intervals: setInterval ( "expr", msecDelay) or setInterval (funcRef, msecDelay) or setTimeout
Medium Modal 84.JS displayed in IE4 line, not in NN Medium: showModalDialog ( "URL" [, arguments] [, features]);
85.JS in the use of the handle before exit:
function verifyClose () (event.returnvalue = "/ blog / we really like you and hope you will stay longer .";}} window .= verifyClose;
86. When the first call form the use of file handles: onload ()
87. Turn off when the call when the form of file handles: onunload ()
88.window.location of property:
protocol (http:), hostname (, port (80), host (,
pathname ( "/ a / a.html"), hash ( "# giantGizmo", refers to the corresponding anchor Jump to remember), href (all information)
89.window.location.reload () to refresh the current page.
90.window.history.back () return to the previous page, window.history.forward () return the next page,
window.history.go (back the first few pages, but also can use the visited URL)
91.document.write () does not wrap the output, document.writeln () line output
92.document.body.noWrap = true; language packs to prevent the link line.
93. Variable name. CharAt (the first of several) for the first number of the variable characters.
94. "Abc". CharCodeAt (the first of several), the first of several return code value of Ascii characters.
95. String to connect: string.concat (string2), or connect =
96. Variables. IndexOf ( "character", start position), return the first occurrence of location (from 0 to start)
97.string.lastIndexOf (searchString [, startIndex]) last seen location.
98.string.match (regExpression), to determine whether the matching characters.
99.string.replace (regExpression, replaceString) to replace the existing string.
100.string.split (separator) return an array of stored values.
101.string.substr (start [, length]) check from the first of several to a specific length of string.
102.string.toLowerCase () so that all into a lowercase string.
103.string.toUpperCase () so that all characters into uppercase.
104.parseInt (string [, radix (on behalf of M-ary)]) the mandatory conversion into integer.
105.parseFloat (string [, radix]) the mandatory conversion into floating-point type.
106.isNaN (variables): Test whether the value type.
107. The definition of the keyword constants: const, the definition of variables keyword: var

分类:AJAX 时间:2009-03-03 人气:1539
blog comments powered by Disqus


  • JS数组(Array)处理函数整理 2014-05-12

    这篇文章主要整理了一下JS数组(Array)处理函数,常用的都汇总了一下,推荐给大家. 1.concat() 连接两个或更多的数组 该方法不会改变现有的数组,而仅仅会返回被连接数组的一个副本. 例如: <script type="text/javascript"> var arr = [1, 2, 3]; var arr1 = [11, 22, 33]; document.write(arr.concat(4, 5, arr1)); </script> 输出结果

  • JavaScript object and array json array of species comparison 2010-03-23

    <script type="text/javascript"> var json ={ses:[[1,1],[2,2]],tes:[[3,3],[4,4]]}; for(var j in json){ alert(j); for(var key in json[j]){ alert(json[j][key]); } } // Print order :ses/1,1/2,2/tes/3,3/4,4 </script> Personal Understanding

  • js three-dimensional array definition and use. 2010-10-08

    <script type="text/javascript"> var arr = new Array (); for (i = 0; i <5; i + +) ( arr [i] = new Array (); for (j = 0; j <6; j + +) ( arr [i] [j] = i + j; ) ) alert (arr.length); / / first dimension of the array length alert (arr [1]

  • Javascript四舍五入Math.round()与Math.pow()使用介绍 2014-07-09

    本文为大家介绍下Javascript中的四舍五入Math.round()与Math.pow()的使用,感兴趣的朋友不要错过 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns="

  • Javascript四舍五入(Math.round()与Math.pow()) 2013-07-11

    代码 Code highlighting produced by Actipro CodeHighlighter (freeware) --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> &

  • 正则表达式提取网址.标题.图片等一例(.Net Asp Javascript/Js)的实现 2014-03-08

    用各种语言实现的提取内容中的网址,标题,图片等功能代码,对于大家掌握正则的共用性有很大的帮助. 在一些抓取.过滤等情况下, 正则表达式 regular expression 的优势是很明显的. 例如,有如下的字符串: <li><a href="" title="FCKEditor高亮代码插件测试"><span class="artic

  • javaScript(JS)替换节点实现思路介绍 2014-08-01

    获取要替换的节点,这种方法只适用于IE浏览器以及适用于各种浏览器的写法,感兴趣的朋友可以参考下哈 <title></title> <script type="text/javascript"> function createNode() { var pNode = document.createElement('p'); var tNode = document.createTextNode('烟花三月下杨州'); pNode.appendChild

  • js object definition and the return value of pop-up window application 2011-05-16

    Pop-up window and return value js code function searchFieldPage(){ var fieldResult = window.showModalDialog('<%=basePath%>bdmField/searchFieldPageForDmn.action?random='+Math.random(),'','dialogWidth=450px;dialogHeight=500px;status:no;resizable=yes;M

  • Using JS to control the page calls a different style sheet 2009-03-17

    Studied some time ago to use JS to control page changes automatically when the browser calls the different styles of questions, ideally in the blue today, they also see a similar code, special excerpt down for later use. SetAttribute method used to a

  • JS dynamically created element 2010-04-01

    1, JS dynamically created iframe <script language="JavaScript"> var ifm = document.createElement("iframe");"ifm"; ifm.width="100%"; ifm.frameborder=1; ifm.src=""; document

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 闽ICP备15018612号

processed in 0.304 (s). 12 q(s)