做网页,怎样在指定的坐标位置上输出文字?

来源:百度知道 编辑:UC知道 时间:2024/05/21 06:50:14
最好用jsp或javascript实现,谢谢
losesfable大哥,为啥报错aa不存在啊?怎么改,我不会

<body>
<div id="showText"></div> <!--要显示文字的层-->
<script language="javascript">
//function showText(x,y)//{
var theText=document.getElementById("showText");
theText.style.left= 100;//距左的坐标
theText.style.top= 500;//距上的坐标
theText.style.position="absolute";//距上的坐标
theText.innerHTML="要输入的文字";
</script>
</body>

新建一个层,在这个层上添加文字