Home >php教程 >PHP开发 >html, css, javascript, jquery usage notes

html, css, javascript, jquery usage notes

高洛峰
高洛峰Original
2016-11-24 11:40:381239browse

//The picture is displayed centered in the div:

//javascript removes spaces at both ends
var pwd=" 123 ";
pwd=pwd.replace(/^s+|s+$/g, "" );//pwd="123"


//javascript scrolls back to the top of the interface
window.scrollTo(0,0);


//javascript regular expression to determine whether the string is composed entirely of numeric characters
if( str.match(/d/)== null)
      alert("The value entered is wrong!");
else
    alert("The value is correct!");


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn