Best Download Sites Login
Site Login

Modify Variable

Description
Removes a character from a variable's value in a string. For example, if you tell it that number equals 0.09876 and to remove the period, afterwords number equals 009876....View A Script Demo


Do you find it confusing setting up these script?
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<LINK href="general.css" rel="stylesheet" type="text/css">


</HEAD>

<BODY Background=../graphics/grayback.jpg>
<center><BR><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var number = "0.09876"; // previous value
var removechar = "."; // character to remove from string

document.write("Initially, number equals " + number);

dec = number.indexOf(removechar);
tmp = number.substring(0,dec);
tmp += number.substring(dec+1,number.length);
number = tmp; // number now equals converted value

document.write("<br>Now, number equals " + number);
//  End -->
</script>

</center>
</BODY>
</HTML>
 

Business Proposal If you have a Business Proposal that you think may be of interest to us here at Best Download Sites please contact us to discuss the matter in further detail