Currently browsing tag

Javascript, Page 3

javascript – Get Browser Type

取得瀏覽器種類 1 2 3 4 5 6 7 8 9 10 function getbrowser() { var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf(’msie’) != -1) …

Regular Expressions – Check Integer

用正規表示式檢查整數. 1 2 3 4 5 function checkint(str) { var regex = /^[1-9]+\d*$|^-[1-9]+\d*$/; re = new RegExp(regex); return (str.match(regex)) != null ? …

Regular Expressions – Get Value

################################# # data string as following : ################################# TITLE=title name CLICK=click Login button to continue. TYPE=type your login password and. RETYPE=retype your …

JavaScript Regular Expressions

When you invoke any of the following methods, and a match is found, the global RegExp object is updated: exec() match() test() …