How to set audio “Welcome Message” using Java Script

Many times, we want to set audio welcome on page load so in this article we will set audio welcome message using JavaScript in asp.net c#
Source Code:-
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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">
<head id="Head1" runat="server">

    <title>Text Message Speak Using Javascript in Asp.Net</title>
    <script type="text/javascript">
        // Text Message Speak Using Javascript
        var msg = new SpeechSynthesisUtterance('Welcome to Neeraj Code Solutions, Thanks for visit my blog');
        window.speechSynthesis.speak(msg);
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    </div>
    </form>
</body>
</html>


Out-Put:-
How to set audio “Welcome Message” using Java Script How to set audio “Welcome Message” using Java Script Reviewed by NEERAJ SRIVASTAVA on 7:10:00 PM Rating: 5

No comments:

Powered by Blogger.