Question : Return a Char at position

Hi, I'd like to know how I could get a Char from a string at a length


for example.

string:='Happy days';

function >>> GetChar(string,3);

results >>> p

then I can move forward.

if GetChar(string,3) = 'p' then
//..
else
//..

Answer : Return a Char at position

to be more specific way..
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
<script>

window.onload=function()
{

var div = document.getElementsByTagName("div"); 


for(j=0;j<div.length;j++)
{

if(div[j].id == 'special')
{
var special = document.getElementById(div[j].id).childNodes; 



 for (var j = 0; j < special.length; j++)
 {


		 if(special[j].nodeName == 'INPUT')
		 {
		   special[j].checked=true;
		 }

 }

 }

 }

 }
 

 

</script>
Random Solutions  
 
programming4us programming4us