Answer the question
In order to leave comments, you need to log in
How to fix Uncaught ReferenceError: name is not defined error?
Hello.
Encountered an error:
Uncaught ReferenceError: asd is not defined
Here is the code:
HTML
<div class="text">
<div class="price">99.000</div>
<div class="productName">REVO Morning</div>
<div class="inf">đắng, hậu ngọt, hương hoa </div>
<div class="cart-btn">
<button class="in__cart" onclick="asd()">MUA NGAY</button>
<a href="" class="deetails">CHI TIẾT</a>
</div>
</div>
function asd(){
console.log('asd');
}
Answer the question
In order to leave comments, you need to log in
<script src="script.js"></script>
You didn't include the js file in the html document.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question