Home > php教程 > PHP开发 > body text

html, css, javascript, jquery usage notes

高洛峰
Release: 2016-11-24 11:40:38
Original
1192 people have browsed it

//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!");


Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!