<script type = "text/javascript">
function DisplayDashboard(Work Package)
{
var Src = '';
if (Work Package=='Google')
{
Src =<a href="https://www.google.com">Link</a>;
}
else if(Work Package=='Bing')
{
Src = <a href ="https://www.bing.com">Link</a>;
}
return <'+Work Package+'>;
}
</script>
我想做的是寻找谷歌或必应,然后在 Javascript 中显示正确的链接。但由于某种原因,它不起作用。