Documentation & code cleaning Javascript
This commit is contained in:
parent
e8acb6749b
commit
b525024728
5 changed files with 53 additions and 86 deletions
|
|
@ -49,11 +49,11 @@ function cal()
|
|||
p_variable=p_variable.replace(/%/,'');
|
||||
p_variable=p_variable.replace(/;/,'');
|
||||
p_variable=p_variable.replace(/>/,'');
|
||||
p_variable=p_variable.replace(/ /g,"");
|
||||
p_variable=p_variable.replace(/\+/g,"+ ");
|
||||
p_variable=p_variable.replace(/-/g,"- ");
|
||||
p_variable=p_variable.replace(/\//g,"/ ");
|
||||
p_variable=p_variable.replace(/,/g,".");
|
||||
p_variable=p_variable.replace(/ /g,"");
|
||||
p_variable=p_variable.replace(/\+/g,"+ ");
|
||||
p_variable=p_variable.replace(/-/g,"- ");
|
||||
p_variable=p_variable.replace(/\//g,"/ ");
|
||||
p_variable=p_variable.replace(/,/g,".");
|
||||
|
||||
sub=eval(p_variable);
|
||||
var result=parseFloat(sub);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue