如何更改href" navbarpage title默认颜色 - 在这种情况下,stackoverflow为蓝色。如何将其更改为白色。
runApp(list(
ui = navbarPage(inverse = TRUE,
title=HTML("<a href=\"http://stackoverflow.com\">stackoverflow</a>"),
tabPanel("tab1")
),
server = function(input, output) { }
))
我想我需要更改body link
属性,当我更改代码时如下:
tags$html(<body link="white">
<p><a href="http://www.stackoverflow.com">stackoverflow</a></p>
</body>)
我收到的错误如下:
Error: unexpected '<' in "<"
Error: unexpected ')' in ")"
我检查了代码,对于每个开头<
,html中都有一个结束/>
,而(
每个)
都有一个结束private void saverec_Click(object sender, EventArgs e)
{
try
{
int recna = Convert.ToInt32(recno_tb.Text);
OleDbConnection myconn = new OleDbConnection();
myconn.ConnectionString = connestr;
var insequ = "INSERT INTO FormEntry (ImageName, RecordNo, EmailId) VALUES (?,?,?)";
OleDbCommand dtcmd = new OleDbCommand(insequ, myconn);
dtcmd.Parameters.AddWithValue("@imagena", OleDbType.VarChar).Value = imgname_tb.Text;
dtcmd.Parameters.AddWithValue("@recno", OleDbType.Integer).Value = recna;
dtcmd.Parameters.AddWithValue("@email", OleDbType.VarChar).Value = email_tb.Text;
myconn.Open();
dtcmd.ExecuteNonQuery();
myconn.Close();
dataconnect();
addnew_Click(sender, e);
recno_tb.Text = (recna + 1).ToString();
email_tb.Focus();
}
catch (Exception ex)
{
if (ex.Message.ToString() == "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.")
{
MessageBox.Show("Record already exists. Try entering new record.\nYou can also find and edit the record.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else if (ex.Message.ToString() == "Field 'FormEntry.RecordNo' cannot be a zero-length string.")
{
MessageBox.Show("Record No can't be null", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
MessageBox.Show(ex.Message.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
myconn.Close();
}
。
如何更改字体的颜色?
答案 0 :(得分:2)
这是你想要的吗?
runApp(list(
ui = navbarPage(inverse = TRUE,
title=HTML("<a style=color:white; href=\"http://stackoverflow.com\">stackoverflow</a>"),
tabPanel("tab1")
),
server = function(input, output) { }
))