我无法弄清楚如何解决这个问题。它说onclick缺少一个分号。我确定我错过了一些明显的东西 - 任何想法?
<a href="http://mywebsite.com" onclick="setTimeout(location.href='https://www.facebook.com/myprofile', 10);return true;">
答案 0 :(得分:2)
您的<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.65">
<children>
<Text layoutX="177.0" layoutY="137.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Welcome!" wrappingWidth="140.02001953125">
<font>
<Font size="25.0" />
</font>
<cursor>
<Cursor fx:constant="NONE" />
</cursor>
</Text>
<Text layoutX="177.0" layoutY="179.0" strokeType="OUTSIDE" strokeWidth="0.0" text="User Name:" wrappingWidth="85.9443359375" />
<Text layoutX="177.0" layoutY="213.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Password:" />
<Button layoutX="353.0" layoutY="242.0" mnemonicParsing="false" text="Sign In" />
<TextField layoutX="263.0" layoutY="161.0" />
<PasswordField layoutX="263.0" layoutY="195.0" />
</children>
</AnchorPane>
语法无效,应为:
setTimeout