Home >Web Front-end >HTML Tutorial >Problem with title attribute of tag in html
The title attribute of5a07473c87748fb1bf73f23d45547ab84afa15d3069109ac30911f04c56f3338 tag in htmlProblem
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <script> //由于<option></option>标签的title属性在有些浏览器上不能够正常工作, //因此我们找了一个解决方法(在<select></select>标签上做文章,具体方法如下:) </script> </HEAD> <BODY> <select id='yy' name=mysel onchange="document.getElementById('yy').title=this.options[this.selectedIndex].text;"> <option value=title1 title='1'>new1 </option> <option value=title2 title='2'>new2 </option> <option value=title3 title='3'>new3 </option> <option value=title4 title='4'>new4 </option> </select> </BODY> </HTML>
The above is the detailed content of Problem with title attribute of tag in html. For more information, please follow other related articles on the PHP Chinese website!