Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

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

Javascript coding ..

Moderators: macek, egami, gesf

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

Postby celcomgirl » 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
example:
Code: Select all
me.date_me.value


me is form name
date_me is field name

but if i do like that it will read the whole field.how 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....
celcomgirl
New php-forum User
New php-forum User
 
Posts: 29
Joined: Tue Sep 02, 2008 7:16 pm

Re: new in javascript......need help..

Postby Suhoij » Tue Aug 17, 2010 3:58 am

This is JavaScript function substr
Code: Select all
var 7chars = me.date_me.value.substr(0,7);
Suhoij
New php-forum User
New php-forum User
 
Posts: 92
Joined: Tue Aug 17, 2010 2:00 am
Location: Ukraine Kharkov


Return to JavaScript

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron