嗨,我有这个HTML代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="/style.css"/>
<link rel="icon" href="">
<title>Submit</title>
</head>
<body>
<script>
function show_alert() {
alert("Animes score is: ");
}
</script>
<div class=střed>
<form>
<div id="one"><input style="width: 500px" type="text" name="url" value="Enter myanimelist URL" onfocus="if (this.value=='Enter myanimelist URL') this.value='';"/></div>
<div id="two"><input type="image" onclick="show_alert();" name="submit" src="/Button1.png" border="0" alt="Submit" />
</div>
</form>
</div>
</body>
</html>
现在我想从用户的网址(例如:https://myanimelist.net/anime/5114/Fullmetal_Alchemist__Brotherhood)获取来自网页html的动漫分数(此部分:<span itemprop="ratingValue">9.26</span>
- 所以在这种情况下它将是9.26)并显示在警报框(不需要警告框,只是以某种方式显示给用户)。谢谢你的帮助。