Guest User

Untitled

a guest
Jun 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. //this program is for speaking with facebook or dictionary...please working on this //project
  2. function hello(){
  3. var x1=new Array();
  4. x1[0]="ahoj:-)";
  5. x1[1]="nazdar bazar:-)";
  6. x1[2]="zdar a sílu:-)";
  7. x1[3]="čau:)";
  8. var prom=Math.floor(Math.random()*3);
  9. form.text1.value=x1[prom];
  10. };
  11. function nothing(){
  12. var x1=new Array();
  13. x1[0]="nic...";
  14. x1[1]="nic:)";
  15. x1[2]="nic:(";
  16. var prom=Math.floor(Math.random()*2);
  17. form.text1.value=x1[prom];
  18. };
  19. function ok(){
  20. var x1 = new Array();
  21. x1[0]="oukej dobře:)";
  22. x1[1]="dobře";
  23. var prom=Math.floor(Math.random()*1);
  24. form.text1.value=x1[prom];
  25. };
  26. function zvk_1(){
  27. var x="";
  28. x=form.text2.value;
  29. switch(x){//
  30. case "ahoj":hello();break;
  31. case "co je?":nothing();break;
  32. case "co nového?":nothing();break;
  33. case "jak se mas?":ok();break;
  34. case "jak to jde?":ok();break;
  35. case "no?":nothing();break;//yea
  36. case "jj":dobre();break;//ok
  37. default :form.text1.value="ok,thank You...";
  38. };
  39. };//to English is easy...
Add Comment
Please, Sign In to add comment