Jump to content

Archived

This topic is now archived and is closed to further replies.

FGC

Postar Tabela Formatada na Noticia

Recommended Posts

Ola amigos

 

Tenho um sistema de cadastro de noticias basico, gostaria de saber como fazer para por exemplo copiar uma tabela feita no excel e colar no meu editor sem perder as formatações de bordas, etc;.

Share this post


Link to post
Share on other sites

use CSS

Share this post


Link to post
Share on other sites

Segue meu Código:

<link rel="stylesheet" media="screen" href="style.css" />
<p align="center"><span style="font-size: 14pt">Cadastro de Noticias
<!-- This is for mobile devices -->
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>

<!-- This makes HTML5 elements work in IE 6-8 -->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<% inputnum = request.querystring("inputnum")
If IsEmpty(inputnum) or inputnum = "" then %> </span></p>

<form id=form method="POST" action="cadastrarnoticia.asp?inputnum=1">


<body>
<h2 id="first" align="left"><span style="font-size: 11pt; font-weight: 400">
<a href="javascript:window.open('ListarNoticias.asp','','height=500,width=830,scrollbars=yes,statusbar=yes,resizable=no');void(0)">
<img border="0" src="alterar.jpg"></a><br>
 </span></h2>

<p>Titulo<span style="font-size: 8pt"><br>
</span>
<input type="text" placeholder="Titulo" size="84" name="name1"><br>
Data<span style="font-size: 8pt"><br>
</span>
<input type="text" placeholder="Autor" size="20" name="date1" value="<%=Date%>"><br>
<br>
<textarea placeholder="Matéria" rows="7" cols="130" name="Entry1"></textarea> </p>
<p> <input type="submit" value="Cadastrar »"> </p>
</form>
<% else
data = request.form("date1")
If data = "" Then data = date()
dia = DatePart("d", data)
If dia < 10 Then dia = "0"&dia
mes = DatePart("m", data)
If mes < 10 Then mes = "0"&mes
ano = DatePart("yyyy", data)
data = dia & "/" & mes & "/" & ano


titulo = request.form("name1")
titulo = Replace(request.form("name1"), "'", "''")
titulo = Replace(Request.Form("name1"), Chr(13), "<br>")


entry1 = request.form("Entry1")
entry1 = Replace(Request.Form("Entry1"), "'", "''")
entry1 = Replace(Request.Form("Entry1"), Chr(13), "<br>")

	Set Conn = Server.CreateObject("adodb.connection")
	conn.Open Dados    
    SQLstmt = "INSERT INTO Noticias(titulo,data,materia)"
	SQLstmt = SQLstmt & " VALUES (" 
	SQLstmt = SQLstmt & "'" & titulo & "',"
	SQLstmt = SQLstmt & "'" & data & "',"
	SQLstmt = SQLstmt & "'" & entry1 & "'"
	SQLstmt = SQLstmt & ")"

	Set RS = conn.execute(SQLstmt)
	
    response.redirect "submitdoc4.asp?id=1"
end if %>


</body>
</html>

Share this post


Link to post
Share on other sites

×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.