有关javascript 问题
来源:百度知道 编辑:UC知道 时间:2024/05/09 10:26:03
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" href="css.css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<script language="javascript">
function showHide(obj)
{
obj.style.display=obj
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" href="css.css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<script language="javascript">
function showHide(obj)
{
obj.style.display=obj
Use following sentences in the right order and occurance to accomplish your task:
tr = document.createElement("tr")
td = document.createElement("td")
tr.appendChild(td)
td.innerHTML = "...."
put above in a for-sentence, the times of sub-sentence depend on your menu quantity.
咩明白你的意思,如果你是需要用js代码自动创建生成菜单项的话可以吧菜单的id和内容定义的有规律,比如菜单1,菜单2.....
你可以看看xml,对你会有帮助