[英]can we call the internal javascript function from another internal javascript function from another html?
Hi I am new to javascript . 嗨,我是javascript新手。 I have a doubt that can we call the internal javascript function from another internal javascript function from another html??
我怀疑我们能否从另一个html调用另一个内部javascript函数来调用内部javascript函数?
For example: 例如:
consider two html a.html and b.html i want to call b.html javascript function from a.html and i want to pass a parameter. 考虑两个html a.html和b.html我想从a.html调用b.html javascript函数,我想传递一个参数。
a.html a.html
<html>
<head>
<script type="text/javascript">
function abc(variable){
xyz(variable);//where xyz function in b.html
}
</script>
</head>
<body>
</body>
</html>
b.html b.html
<html>
<head>
<script type="text/javascript">
function xyz(variable){
alert('message::'+variable);
}
</script>
</head>
<body>
</body>
</html>
Is this possible or is there any other way to do this??? 这可能还是有其他方法可以做到这一点???
Yes, it is possible. 对的,这是可能的。
I do not recommend any. 我不推荐任何东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.