testsms.jsp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <%@page import="com.chinacreator.common.util.DESUtil"%>
  2. <%@page import="com.chinacreator.common.util.AESUtil"%>
  3. <%@ page language="java" contentType="text/html; charset=utf-8"
  4. pageEncoding="utf-8"%>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  9. <title>Insert title here</title>
  10. <script type="text/javascript" src="js/jquery.js"></script>
  11. <script type="text/javascript" src="js/jquery.form.js"></script>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. </head>
  14. <%
  15. String tuserid = DESUtil.encode("18620198994", "tenc1234");
  16. String iuserid = DESUtil.encode("18620198994", "a23c4140");
  17. %>
  18. <script type="text/javascript">
  19. function send1(){
  20. $.ajax({
  21. type:'get',
  22. url:"sendSmsCode.do?userid=<%=tuserid%>&cpid=tencent&spid=6&apptype=1",
  23. cache:false,
  24. dataType:"text",
  25. success:function(msg){
  26. alert(msg);
  27. }
  28. });
  29. }
  30. function send2(){
  31. $.ajax({
  32. type:'get',
  33. url:"sendSmsCode.do?userid=<%=tuserid%>&cpid=tencent&spid=99119423&apptype=1",
  34. cache:false,
  35. dataType:"text",
  36. type:"post",
  37. success:function(msg){
  38. alert(msg);
  39. }
  40. });
  41. }
  42. function send3(){
  43. $.ajax({
  44. type:'get',
  45. url:"sendSmsCode.do?userid=<%=tuserid%>&cpid=tencent&apptype=1",
  46. cache:false,
  47. dataType:"text",
  48. success:function(msg){
  49. alert(msg);
  50. }
  51. });
  52. }
  53. function send4(){
  54. $.ajax({
  55. type:'get',
  56. url:"sendSmsCode.do?userid=<%=iuserid%>&cpid=ifeng&apptype=1",
  57. cache:false,
  58. dataType:"text",
  59. success:function(msg){
  60. alert(msg);
  61. }
  62. });
  63. }
  64. </script>
  65. <body>
  66. 腾讯15元包月
  67. <input type="button" value="发送短信" onclick="send1()" />
  68. <br />
  69. 腾讯首月免产品
  70. <input type="button" value="发送短信" onclick="send2()" />
  71. <br />
  72. 腾讯产品
  73. <input type="button" value="发送短信" onclick="send3()" />
  74. <br />
  75. 凤凰产品
  76. <input type="button" value="发送短信" onclick="send4()" />
  77. </body>
  78. </html>