我从数据库中获取以下文本,href
为 null。
You also have to click on this link .
我在页面加载时分配给标签的文本。
我的要求是当我点击“链接”时我需要重定向到特定页面。我应该在哪里分配 href
值以及如何分配?
最佳答案
<script>
var s = document.getElementByTagName("a");
s.href = ""; // here give the href value
</script>
关于c# - 将 href 设置为超链接文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14049867/