⑴ 如何用代码实现返回键的功能谢谢

为楼主提供另外一个思路:楼主可以使用这个类:public class Instrumentationextends Objectjava.lang.Object android.app.Instrumentation Known Direct Subclasses InstrumentationTestRunner InstrumentationTestRunner An Instrumentation that runs various types of TestCases against an Android package (application). Class OverviewBase class for implementing application instrumentation code. When running with instrumentation turned on, this class will be instantiated for you before any of the application code, allowing you to monitor all of the interaction the system has with the application. An Instrumentation implementation is described to the system through an AndroidManifest.xml's tag. Summary

⑵ javascript 实现页面跳转 然后按返回键不会回到上一页 应该怎么写

你是说返回键不会回到跳转之前的那个页面?

这个非常的简单!

不知道你的js基础怎么样? 在我们的js的dom编程基础知识里面我们已经指定浏览器对象的6大属性。 其中就有location对象和history这连个对象 。分别介绍两个对象

  • location:存储了大量的关于当前页面的地址信息。还有连接到web服务器的端口等(这个不是重点)

  • history这个对象存储了浏览器浏览过得历史页面(它里面有个历史栈)。

location有个方法叫 replace(url) 这个方法可以替换history对象里面里面的历史栈当前页面

换成新的(也就意味着跳转后 注意哦这个跳转是意味着我们跳转之前最起码是在一个页面的基础之上才可以跳转到另一个页面的),这也意味着“后退”或者“前进”都无法在回到跳转之前的页面了。因为在历史栈帧它(跳转之前的页面)已经被替换了。这个替换就是通过location的replace方法实现的。

下面贴出代码!

<!doctypehtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="Generator"content="EditPlus®">
<metaname="Author"content="">
<metaname="Keywords"content="">
<metaname="Description"content="">
<title>Document</title>
<scripttype="text/javaScript">
functionf(){
alert(history.length);
location.replace('http://www..com');
alert(history.length);

}
</script>
</head>
<body>
这个是一个页面
<buttontype="button"onclick="f()">点击我跳转新的页面</button>
</body>
</html>

我不确定这个是不是你要的! 知识利用了replace这个方法将历史栈中的页面替换了。我理解你的提出的问题“回不到上一页” 我就当是那个页面再也找不到了。

⑶ 怎么设置屏幕返回键

若手机支持设置导航条功能,设置方法可参考:设置-显示-导航条-按钮布局。

⑷ html 请问如何在按下按钮的时候返回特定值并跳转到特定页面

<formmethod="post">
<inputtype="text"value="aaa"name="123"/>
<ahref="/"><inputtype="button"value="递交数值"></a>
</form>

请笑纳,更多编程资源,可以进入下面网址

http://蝶舞纷飞.flysgirl.com

⑸ 返回到上一页的html代码的几种写法

返回到上一页的html代码的几种写法

1.超链接返回上一页代码:

<a href=”#” onClick=”javascript :history.back(-1);”>返回上一页</a>
<a href=”#” onClick=”javascript :history.go(-1);”>返回上一页</a>

2.用按钮代码:

<input type=”button” name=”Submit” onclick=”javascript:history.back(-1);” value=”返回上一页”>

3.图片代码:

<a href=”javascript :;” onClick=”javascript :history.back(-1);”><img src=”图片路径” border=”0″ title=”返回上一页”></a>

[color=#FF0000]几秒钟后[/color]自动返回上一页代码:(加入两个head间,3000表示3秒)

<SCRIPT language=javascript>

function go()

{

window.history.go(-1);

}

setTimeout(“go()”,3000);

</SCRIPT>

“>返回上一页</a>

<script>alert(‘发布失败’);location.href=’index.php’; window.history.go(-1);

</script>

(5)html返回键扩展阅读:

跳转页面的html代码的几种写法

  1. html的实现

<head>

<!-- 以下方式只是刷新不跳转到其他页面 -->

<metahttp-equiv="refresh" content="10">

<!-- 以下方式定时转到其他页面 -->

<metahttp-equiv="refresh" content="5;url=hello.html">

</head>

2.javascript的实现

<script language="javascript"type="text/javascript">

// 以下方式直接跳转

window.location.href='hello.html';

// 以下方式定时跳转

setTimeout("javascript:location.href='hello.html'", 5000);

</script>

3.结合了倒数的javascript实现(IE)

<spanid="totalSecond">5</span>

<scriptlanguage="javascript" type="text/javascript">

var second = totalSecond.innerText;

setInterval("redirect()", 1000);

function redirect(){

totalSecond.innerText=--second;

if(second<0) location.href='hello.html';

}

</script>

⑹ html中返回按钮怎么实现

最简单的一个例子:
<input type="button" value="测试" onclick="alert('这是一个事件测试')" />
如果实现更复杂的功能可以写一个函数,然后在事件里调用
如:<script>
function button_onclick(){
//这里写你要执行的语句
alert("这是调用函数");
}
</script>
<input type="button" value="测试" onclick="javascript:button_onclick();" />

⑺ 如何让一个按钮实现返回键的功能

页面之间的跳转有startActivity 和startActivityForResult两种,
startActivity :只能跳到下一个页专面
startActivityForResult: 不仅能跳到下一个页面,而且当下一个页面finish()时就可以返回属上一页面
所以您应该用startActivityForResult方法来跳转页面,并在您的按钮上加个监听,当点击该按钮是finish();掉本页面,就能返回到上一页面了.

⑻ html中怎么把取消按键做成返回

这样啊,一楼有解,我加上一些:
返回是直接<a href='main.html'></a>
如果想要返回上一页 则表示<a href="###" onclick="javascript:history.go(-1);">

⑼ html:如何在按钮上添加事件,让它返回到特定的页面谢谢了

<input type="button" name="Submit" value="返回" onclick ="location.href='test.html'"/>
'test.html'要和本页面在同一路径下