zoukankan      html  css  js  c++  java
  • 表单提交到商务通后台 中文说明加换行的实现方法(转)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
    <title>表单提交到商务通后台 中文说明加换行的实现方法</title>
    <style type="text/css">
        #yuyue {width:320px;margin:0 auto;}
    </style>
    </head>
    <body>
    
    <div id="yuyue">
        <p>姓名: <input type="text"  id="gname"></p>
        <p>年龄: <input type="text" id="gage"></p>
        <p>电话: <input type="text" id="gphone"></p>
        <p>留言: <textarea id="gmsg" cols="30" rows="4"></textarea></p>
        <p><input type="button" value="提交" onclick="submit_to_swt();"></p>
    </div>
    
    <script type="text/javascript">
        function submit_to_swt(){
            var name = document.getElementById("gname");
            var age = document.getElementById("gage");
            var phone = document.getElementById("gphone");
            var msg = document.getElementById("gmsg");
            if(name.value==""){
                alert("请输入您的姓名!");
                name.focus();
                return false;
            }
            if(age.value==""){
                alert("请输入您的年龄:!");
                age.focus();
                return false;
            }
            if(phone.value==""){
                alert("请输入您的电话!");
                phone.focus();
                return false;
            }
            if(msg.value==""){
                alert("请输入您的留言:!");
                msg.focus();
                return false;
            }
    
    
            if(typeof openZoosUrl != "undefined"){
                openZoosUrl('chatwin','&e='+escape('姓名:'+name.value+'<br/>年龄:'+age.value+'<br/>电话:'+phone.value+'<br/>留言:'+msg.value));
            }
    
        }
    </script>
    
    <!--测试请将此处商务通代码替换为你的-->
    <script language="javascript" src="http://testserver.zoosnet.net/JS/LsJS.aspx?siteid=lza69557093&lng=cn"></script>
    <!--测试请将此处商务通代码替换为你的-->
    
    </body>
    </html>

    文章转载于:http://www.120muban.com/code/swtcode/256.html

  • 相关阅读:
    codevs 3115 高精度练习之减法 swap
    codevs 3116 高精度练习之加法
    poj 3984 迷宫问题
    codevs m进制转化成10进制
    codevs 1214 线段覆盖
    codevs 3143 二叉树的序遍历
    codevs 3145 汉诺塔
    HDU 5093 Battle ships [二分图匹配]
    HDU 5074 Hatsune Miku [dp] ——2014鞍山现场赛E题
    ZOJ 3793 First Digit (逗比题)
  • 原文地址:https://www.cnblogs.com/linyusong/p/8689928.html
Copyright © 2011-2022 走看看