Play sound in HTML

html play tone:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>用javascript进行声音播放控制</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<embed src="MSN.wav" loop="0" autostart="true" hidden="true"></embed>
</body>
</html>
Description: src in the path of the incoming audio file
can js to control the embed tag according to needs of the project, so that we can achieve when playing a tone consistent with the desired item.

Published 90 original articles · won praise 21 · views 470 000 +

Guess you like

Origin blog.csdn.net/yx13649017813/article/details/40787709