0
我真的很困惑MVC架构和数据的模型。我知道数据库是存储数据。请回答以下问题 Q1)请在下面的代码中告诉我是Model和什么是视图? Q2)当数据/数据库变成模型时?MVC模型,数据和数据库有什么区别?
<!DOCTYPE html>
<html>
<body>
<p>Is this line is a model or a view or data?</p>
<p>In my opinion this button is a controller that shows
"Hello world" as a view. Am i right?</p> <button onclick="myFunction()">Click me</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>
</body>
</html>
请在Web应用程序的上下文中解释。