在我的三星Galaxy S3上使用Android 4.1并查看我的网站时,我试图让左侧的导航菜单保持原样,但事实并非如此.每当我点击菜单中的链接并刷新页面页面时,它就会在html页面中间跳转,链接无法正常工作.它在桌面浏览器上运行良好.
有谁知道如何解决这个问题?
几乎用Java的这个登录系统工作,但是这个方法有问题:
public void Register() {
Scanner sc = new Scanner(System.in);
System.out.print("Register? (Y/ N)\n");
String N = sc.nextLine();
if ("N".equals(N)) {
Login();
} else {
String Y = sc.nextLine();
if ("Y".equals(Y)) {
System.out.print("Email address: ");
String string = sc.nextLine();
System.out.print("Password: ");
String string2 = sc.nextLine();
System.out.print("\n\n");
new Products().search();
}
}
}
Run Code Online (Sandbox Code Playgroud)
输入"N"在if部分中完美地工作,但是在"否"部分工作之前需要输入"Y"两次(我理解为什么它不起作用).
我知道它的简单,但任何线索,如何让它工作?
感谢任何帮助......
有这个代码(下面),我试图在 React.js 中点击一个按钮来显示文本。
代码如下:
class App extends Component{
render(){
alert=()=>{return(<h1>Hi</h1>)}
return(<div className="App">
<button onClick={this.alert}>Enter</button>
</div>);
}}
export default App;
Run Code Online (Sandbox Code Playgroud)
任何想法为什么它不起作用......?