new in javascript......need help..

Javascript coding ..

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 29
Joined: Tue Sep 02, 2008 7:16 pm

Mon Nov 10, 2008 6:33 pm

hai.. i new in js...
i need some helps

from other resoures to read value in field using javascript can do like this

Code: Select all

me is form name
date_me is field name

but if i do like that it will read the whole come if i want only read the 7 character from the field?
for example value of field is '2008-11-11' but i only want read '2008-11'
plzz help me....

New php-forum User
New php-forum User
Posts: 92
Joined: Tue Aug 17, 2010 2:00 am
Location: Ukraine Kharkov

Tue Aug 17, 2010 3:58 am

This is JavaScript function substr

Code: Select all

var 7chars = me.date_me.value.substr(0,7);

Post Reply