假设我有一个在渲染之前编写的ReactJS测试函数,位于index.js文件中。
function testfunction(){
console.log("this is test function written in reactjs")
}
我想在HTML脚本中调用上述ReactJS函数。
<html>
<body>
//including reactjs minified js in the index.html
<script src="reactjs.min.js"></script>
<script>
//here i want to call function written in reactjs file
testfunction();
</script>
</body>
</html>