Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html> 
<html> 
<head> 
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
function formresponse() {
    var m = document.forms["form1"]["meal"].value;
    var d = document.forms["form1"]["drink"].value;
    if (m==null || m=="")
       {
        alert("餐點不可為空白!");
        return false;
       }
    else if (d==null || d=="")
       {
        alert("飲料不可為空白!");
        return false;
       }
    else
       {
        var MySubmit = "https://docs.google.com/forms/d/1iIyc3lQ5Rg3lptEomwclJwawfhUF3AFLKgpBdPHrPAs/formResponse?entry.1105876683=" + m + "&entry.720345023=" + d + "&submit=Submit";
        $("#formresponse").html(unescape("%3Cscript type='text/javascript' src='" + MySubmit + "'%3E%3C/script%3E"));
        alert("你訂的" + m + "及" + d + "已送單");
       }
}
</script>
</head>
<body>
    <span id="formresponse"></span>
    <form name="form1" action="javascript:formresponse();">
        <div data-role="fieldcontain">
            <label for="name">便當:</label><input type="text" name="meal">
        </div>
        <div data-role="fieldcontain">
            <label for="name">飲料:</label><input type="text" name="drink">
        </div>
        <input type="submit" value="Submit">
    </form>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers