Sumber Kode

Javascript Get Only Number and Get Only String

  • anonymous
  • Apr 28' 14
  • Javascript
  • 938
  • 9
  • United States

This the function for get String type from a string

var angka=data.replace(/[^0-9]+/g, "");

 

This for get only Number

var huruf = data.replace(/(d+)/g, ');

 

Share

  • Tags : string, get number
comments powered by Disqus

Kode Terkait

Coloring Cells in a DBGrid

Coloring Cells in a StringGrid

Encrypt Text using key number

Crypting with Xor

Export a MS Word Table to a TStringGrid



Kategori

Tag Terhubung