Generation

translateMon, 16 Jan 2023

<!DOCTYPE html> <html> <head> <title>My Chatbot</title> <script> function chatbotResponse() { var input = document.getElementById("userInput").value; if (input === "Hello") { document.getElementById("chatbotResponse").innerHTML = "Hello, how can I help you today?"; } else if (input === "Goodbye") { document.getElementById("chatbotResponse").innerHTML = "Goodbye, have a great day!"; } else if (input === "How are you") { document.getElementById("chatbotResponse").innerHTML = "I am fine , I hope you are also fine..."; } else if (input === "Good night") { document.getElementById("chatbotResponse").innerHTML = "Good night to you 😊"; } else if (input === "Good morning") { document.getElementById("chatbotResponse").innerHTML = "Good morning, How can I help you today....?"; }else if (input === "Who is your developer") { document.getElementById("chatbotResponse").innerHTML = "My developer is <b>Danish Veer Rana</b>"; } else if (input === "Time") { document.getElementById("chatbotResponse").innerHTML = "I'm sorry , I am not able to show live time , you can ask me another question..."; } else if (input === "What is your name") { document.getElementById("chatbotResponse").innerHTML = "I have no name , I am AI for your help , and my developer is <b>Danish Veer Rana</b>"; } else if (input === "Good afternoon") { document.getElementById("chatbotResponse").innerHTML = "Good afternoon, How can I help you..?"; } else if (input === "Good evening") { document.getElementById("chatbotResponse").innerHTML = "Good evening , How can I help you......?"; } else { document.getElementById("chatbotResponse").innerHTML = "I'm sorry, I didn't understand your input."; } } </script> <link rel="stylesheet" type="text/css" href="./style.css"> <style> .a { font-size: 90px; font-weight: bold; left: 50%; right: 50%; background-color: #595959; color: #999999; border: 2px #595959; border-radius: 20px; box-shadow: 1px 1px 2px white, 0 0 10px black, 0 0 5px black; margin: 10px; padding: 10px; } .b { margin-left: 15%; padding:15px; border-radius: 20px; } input[type=text] { width: 30%; border-radius: 100px; padding:20px; -webkit-transition: width 0.15s ease-in-out; transition: width 0.15s ease-in-out; } button { width: 10%; border-radius: 20px; padding:20px; margin: 1px; -webkit-transition: width 0.15s ease-in-out; transition: width 0.15s ease-in-out; } #chatbotResponse { color:Black; border-radius: 20px; /* When the input field gets focus, change its width to 100% */ input[type=text]:focus { width: 40%; } </style> </head> <body> <h1><b><i>Beta</i></b></h1> <p>Ask me anything..</p> <div class="b" > <div class="a"><input type="text" id="userInput"> <button onclick="chatbotResponse()">></button> </div></div> <p><b>Chatbot: </b><span id="chatbotResponse"></span></p> <body style="background-image: linear-gradient(purple, gold);"> </body> </body> </html>

func add(a, b) -> Int { return a + b }

Want to kickstart your project?Use the new AI Studio to create your code