<?xml version="1.0" encoding="utf-8"?>

<snippet name = "只有数字" description = "验证给定的字符串完全由数字组成。" preview="code" type="block">

<insertText location="beforeSelection">

<![CDATA[function onlyNumbers(inputString)

{

  var searchForNumbers = /\D+\_+\W+\s+\S+/

  (searchForNumbers.test(inputString)) ? return false : return true;

} ]]>

</insertText>

<insertText location="afterSelection"><![CDATA[]]>

</insertText>

</snippet>

