sách gpt4 ai đã đi

javascript - 1 vấn đề javascript/css 2 vấn đề perl cgi

In lại 作者:行者123 更新时间:2023-11-27 22:32:00 29 4
mua khóa gpt4 Nike

Javascript CSS 问题:

我正在使用一个文本框来写入一个 div。我使用以下 javascript 获取文本框来执行此操作:


我将 div 样式设置为具有 white-space:pre-wrap,它在 Firefox 中有效,但在 IE 中无效。有谁知道 css 规则或一些额外的 javascript 使 div 反射(reflect)在文本框中输入的回车符也被输入到 div 中?

我正在研究 perl cgi 脚本,其他人开始将使用背景图像的文本作为电子贺卡发送。这是 perl cgi 脚本:

#!/usr/local/bin/perl5

use CGI;
use GD;
use CommonSubs;
use DBI;

use dbInfo;

$q = new CGI;


$userInfo= &CommonSubs::DirInfo($userId);

$user = $ENV{'REMOTE_USER'};
$from = $q->param('from');
$to = $q->param('to');
$cc = $q->param('cc_manager');
$card = $q->param('card');
$message = $q->param('message');



my %availableCards = ("card1" => "large_card_1.jpg",
"card2" => "large_card_2.jpg",
"card3" => "large_card_3.jpg",
"card4" => "large_card_4.jpg",
"card5" => "large_card_5.jpg",
"card6" => "large_card_6.jpg",
"card7" => "large_card_7.jpg",
"card8" => "large_card_8.jpg",
"card9" => "large_card_9.jpg");

my $cardToUse = $availableCards{$card};
my $emailContent = "";

$text = $message;
@lines = split(/\n/, $text);
$lCnt .= $#lines+1;
$lineStart = 80;
$lineHeight = 24;



$container = "..../root-wwwin/htdocs".$cardToUse;
$font = "....verdana.ttf";




$image = GD::Image->newFromJpeg($container);


$txtColor = $image->colorResolve(0,0,0);

for ($i=0; $i<$lCnt; ++$i){
$xPos = 375;
$yPos = $lineStart + ($lineHeight*$i);
@bounds = $image->stringTTF($txtColor,$font,13,0,$xPos,$yPos,@lines[$i]);
}


$ts = time();
$imgFile = "ecard_".$user."_".$ts.".jpeg";

open(IMGFILE, "...$imgFile");
binmode IMGFILE;
print IMGFILE $image->jpeg;
close (IMGFILE);

$img = "";

$emailContent = <<>


$card


HTML


&CommonSubs::sendEmail("$to\@xxx.com","$from\@xxx.com","$cc\@xxx.com", "","$bcc\@xxx.com",$emailContent);

print "Content-type: text/html\n\n";
print "$img";
print "ecard sent";

我需要的是 perl cgi 代码,当它通过 sendmail 发送时,使文本环绕在用作 html 背景的图像之上。

预先感谢您的帮助。

1 Câu trả lời

预包装替代品:

.wordwrap {  
white-space: pre-wrap; /* css-3 should we be so lucky... */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 ?? */
white-space: -o-pre-wrap; /* Opera 7 ?? */
word-wrap: break-word; /* Internet Explorer 5.5+ */
_white-space: pre; /* IE only hack to re-specify in addition to
word-wrap */
}

关于javascript - 1 javascript/css 问题 2 perl cgi 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3519359/

29 4 0
Bài viết được đề xuất: javascript - 使用数据绑定(bind)动态创建 Angular-Chart
Bài viết được đề xuất: javascript - 从 mathjax 纸质输入 polymer 对象中提取输入值
Bài viết được đề xuất: javascript - AngularJS:旧 Angular 版本中的 $q.race()
Bài viết được đề xuất: Javascript DOM `null`
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com