js 提示信息
来源:互联网 发布:软件测试工作日志 编辑:程序博客网 时间:2024/05/19 00:55
<!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=gb18030" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2,关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<meta name="Author" content="第五只鼠,email" />
<meta name="Copyright" content="本页版权归第五只鼠所有。All Rights Reserved" />
<title>无标题文档</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script src="date.js"></script>
<script language="javascript">
String.prototype.Trim = function()
{
return this.replace(/(^/s*)|(/s*$)/g,"");
}
function goto()
{
if(check()){
document.form1.submit();
}
}
function check()
{
if(document.all.form1.title.value.Trim()==""){
alert("请填写标题!");
return false;
}
return true;
}
//限制显示内容的长度
function fixTitleLength(titleContent,titleLength){
var content = titleContent.toString();
var length = Number(titleLength);
if(content.length>length){
content = content.substring(0,length)+"...";
}
return (content);
}
//创建层显示全部的提示内容
var titleSpan ;
var x,y;
function showTitleContent(content){
if(typeof (titleSpan)=='undefined'){
titleSpan = document.createElement("<span id='spanid' class='spanstyle'></span>");
document.body.appendChild(titleSpan);
}
var yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
}
x = document.body.scrollLeft+event.clientX;
y = yScroll+event.clientY;
var thisspan = eval("spanid.style");
thisspan.posLeft=x;
thisspan.posTop=y;
titleSpan.innerText = content.toString();
thisspan.display ='block';
}
//隐藏要显示的内容
function hiddenTitleContent(){
titleSpan.style.display = 'none';
}
/*
function showMsg(){
document.getElementById("div_msg").style.display="block";
}
function hideMsg(){
document.getElementById("div_msg").style.display="none";
}
function tips(id,str){
var l=document.getElementById(id).offsetLeft+140;
var t=document.getElementById(id).offsetTop+80;
document.getElementById("tips").innerHTML=str;
document.getElementById("tips").style.left=l+"px";
document.getElementById("tips").style.top=t+"px";
document.getElementById("tips").style.display="";
}
function outtips(){
document.getElementById("tips").style.display='none';
}
*/
</script>
</head>
<body>
<h3 class="subTitle">文字词汇</h3>
<form id="form1" name="form1" action="#.do">
<table width="90%" border="0" align="center" cellpadding="0" class="table2" cellspacing="0"><div id="tips" style="position:absolute;border:1px solid #ccc;padding:0px 3px;color:#f00;display:none;height:20px;line-height:20px;background:#fcfcfc"></div>
<tr>
<th align="right" width="10%">問題Ⅰ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい',50));</script>
<input name="Submit3" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion1_add.htm');"/>
</td>
</tr>
<tr>
<th align="right">問題Ⅱ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい',50));</script>
<input name="Submit4" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td>
</tr>
<tr>
<th align="right">問題Ⅲ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい',50));</script>
<input name="Submit5" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td>
</tr>
<tr>
<th align="right">問題Ⅳ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい',50));</script>
<input name="Submit6" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion1_add.htm');"/></td></tr>
<tr>
<th align="right">問題Ⅴ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('_のところに何を入れますか。1.2.3.4からいちばんいいものを一つえらびなさい',50));</script>
<input name="Submit7" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion1_add.htm');"/></td></tr>
</table>
<h3 class="subTitle">阅读语法</h3>
<table width="90%" border="0" align="center" cellpadding="0" class="table2" cellspacing="0">
<tr>
<th align="right" width="10%">問題Ⅰ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。',50));</script> <input name="Submit3" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td>
</tr>
<tr>
<th align="right">問題Ⅱ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。',50));</script>
<input name="Submit8" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td>
</tr>
<tr>
<th align="right">問題Ⅲ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。',50));</script> <input name="Submit5" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td>
</tr>
<tr>
<th align="right">問題Ⅳ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。',50));</script> <input name="Submit6" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td></tr>
<tr>
<th align="right">問題Ⅴ</th>
<td colspan="3" onmousemove="javascript:showTitleContent('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。');" onmouseout="javascript:hiddenTitleContent();">
<script type="text/javascript">
document.write(fixTitleLength('次の文章を読んで、後の問いに答えなさい。答えは、1.2.3.4から最も適当なものを一つ選びなさい。',50));</script> <input name="Submit7" type="button" class="button3" value="编辑" onclick="window.location.reload('jlptQuestion2_add.htm');"/></td></tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="yesno">
<tr>
<td height="50" align="center">
<input type="button" name="Submit" value="返回" onclick="window.location.reload('jlptTest_list.htm');" />
</td>
</tr>
</table>
</form>
</body>
</html>
- js 鼠标提示信息
- js 提示信息
- JS 信息提示 alert
- JS控制显示 提示信息
- js實現鼠標移動提示框架信息
- js通用提示信息(tooltip)
- JS中的信息提示框
- js提示信息的写法
- 输入信息页面js验证,提示信息
- 提示信息窗口的JS实现
- JS实现仿新浪信息提示效果
- JS实现仿新浪信息提示效果
- JS 角本提示信息框
- js脚本获取信息并提示错误
- js 页面卸载前的信息提示
- JS屏蔽网页中的错误提示信息
- js弹出提示信息并自动关闭
- js操作输入框提示信息
- windows api函数大全二
- jpg文件的MimeType为image/jpeg
- AT NEW 用法和注意
- Linux下的文件和目录权限含义(转载)
- Android popupWindow 用法
- js 提示信息
- 问一下?
- 条件编译(#ifdef,#else,#endif,#ifndef,#else,#endif)
- 测试phoneme advance(DirectFB)运行环境
- sql字段保存值[1,2,3,4,5]复杂取法,收藏sql函数
- Java String类深入了解
- 软件测试专家贺炘谈行业前景与测试人员成长
- android 中imageview 与diallog综合应用猜牌游戏
- 经典JavaScript分页代码