我想知道如何将这些文本框放在另一个文本框下面.textbox
,然后在顶部,然后textbox1
在下面.
CSS
.textbox {
border: 1px solid #848484;
-moz-border-radius-topleft: 30px;
-webkit-border-top-left-radius: 30px;
border-top-left-radius: 30px;
-moz-border-radius-topright: 30px;
-webkit-border-top-right-radius: 30px;
border-top-right-radius: 30px;
border: 1px solid #848484;
outline:0;
height:25px;
width: 275px;
padding-left:20px;
padding-right:20px;
}
.textbox1 {
border: 1px dotted #000000;
outline:0;
height:25px;
width: 275px;
}
Run Code Online (Sandbox Code Playgroud)
HTML
<input class="textbox" type="text">
<input class="textbox1" type="text">
Run Code Online (Sandbox Code Playgroud) 我尝试将其转换为字节数组,但最小字节数组为5.但是我只有4个字节用于此日期时间,以字节形式存储在我的字节数组中.
代码是这样的:
byte[] b = new byte[] {10,12,12,12};
DATETIME t=datetime.now();
array.copy(BitConverter.GetBytes(t.ticks),1,b,4);
Run Code Online (Sandbox Code Playgroud)
但是getbytes(t.ticks)返回8个字节的数组.我不知何故希望它只转换为4个字节.
我有一个列,其中一些用户没有输入空格(即:.................................... .....)它正在拉伸我的TD专栏.
有没有办法用简单的选项强制html中的换行符?如果没有,我想我将不得不打破自己的阵容,这不是最佳的,因为我必须确定打破一条线的最佳位置,我不想那样做.
我正在寻找可以在3个主要浏览器中工作的东西(即/ firefox/safari)
这是我的代码:
<td valign="top">
<br>
<strong><?php echo $common->stripHtml($row['one_liner']); ?></strong>
<br>
<hr>
<?php
if (strlen($row['self_description']) > 240)
{
echo substr($common->stripHtml($row['self_description']), 0, 240)."... <a href='viewprofile.php?i=".$row['user_id']."'>more</a>";
}
else
{
echo $common->stripHtml($row['self_description']);
}
?>
</td>
Run Code Online (Sandbox Code Playgroud) 如何使用AJAX在我的网站上刷新结果?
<div id="Results">
// Mysql info to show a list of <li>
</div>
Run Code Online (Sandbox Code Playgroud)
我想每10分钟更新一次div.
我试图生成日期x和日期y之间的日期范围,但失败了.我在c#中使用相同的方法,所以我尝试尽可能多地修改它但是没有得到结果.知道我能解决什么吗?
private ArrayList<Date> GetDateRange(Date start, Date end) {
if(start.before(end)) {
return null;
}
int MILLIS_IN_DAY = 1000 * 60 * 60 * 24;
ArrayList<Date> listTemp = new ArrayList<Date>();
Date tmpDate = start;
do {
listTemp.add(tmpDate);
tmpDate = tmpDate.getTime() + MILLIS_IN_DAY;
} while (tmpDate.before(end) || tmpDate.equals(end));
return listTemp;
}
Run Code Online (Sandbox Code Playgroud)
说实话,我试图让所有日期从1月1日开始到2012年12月31日结束.如果有更好的方法,请告诉我.谢谢
我和我的朋友一起有一点闲暇主页.他不是程序员,为了让他能够更改首页上的一些文字,我创建了一个php脚本,
1)从文件"tester.txt"读取数据(这是应该在首页上的文本)
2)将此文本打印到textarea,您可以在其中编辑文本并再次提交
3)将编辑后的文本写入同一个文件"tester.txt"
两个函数Read(); 和写(); 看起来像这样
function Read() {
$file = "tester.txt";
$fp = fopen($file, "r");
while(!feof($fp)) {
$data = fgets($fp, filesize($file));
echo "$data <br>";
}
fclose($fp);
}
function Write() {
$file = "tester.txt";
$fp = fopen($file, "w");
$data = $_POST["tekst"];
fwrite($fp, $data);
fclose($fp);
}
Run Code Online (Sandbox Code Playgroud)
我唯一的问题是,当文本被打印到文本区域时,行返回被写为<br>
- 我真的不希望它这样做,因为当你编辑一些代码并重写它时,另一层<br>
出现了.这是一个截图来说明:
这有什么解决方法吗?
谢谢!
如果您需要剩下的代码,这里是:
<html>
<head>
<title>Updater</title>
</head>
<body>
<?php
function Read() {
$file = "tester.txt";
$fp = fopen($file, "r");
while(!feof($fp)) {
$data = fgets($fp, filesize($file));
echo "$data <br>"; …
Run Code Online (Sandbox Code Playgroud) 我尝试从CategoryType表单设置字段"author"的值.我希望它是来自使用FOS包登录的当前用户的用户ID.
我的CategoryType表单:
namespace My\CategoryBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class CategoryType extends AbstractType
{
private $userId;
public function __construct(array $userId)
{
$this->userId = $userId;
}
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('title')
->add('author')
->add('content')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'My\CategoryBundle\Entity\Category',
'auteur' => $this->userId
));
}
/**
* @return string
*/
public function getName()
{
return 'my_categorybundle_category'; …
Run Code Online (Sandbox Code Playgroud) 我的头撞在墙上看似死得很简单.
这里是:
<html>
<head></head>
<body>
<form method="post" action="action.php">
<div><input type="checkbox" name="test" value="Newspaper"> <span >Newspaper</span></div>
<div><input type="checkbox" name="test" value="PC"> <span >PC</span></div>
<div><input type="checkbox" name="test" value="Home"> <span >Home</span></div>
<div><input type="checkbox" name="test" value="Dont_know"> <span >dnunno</span></div>
<input type="submit" name="Submit" value="send">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
但是当我选择多个选项时.我在我的print_r($_POST);
陈述中只看到最后选择的选项而不是所有选定的选项.我应该怎么处理这个?
更新:我检查了我的其余代码,我看到这是由一些JavaScript完成的.
else if (aform.validatorArr[i][4] == "checkbox") {
var fvs = "";
eval("var chkbArray=aform." + aform.validatorArr[i][1] + ";");
if (aform.validatorArr[i][2] == "cb_true") {
for (k = 0; k < chkbArray.length; k++) {
if (chkbArray[k].checked) {
fvs += chkbArray[k].value;
console.log(fvs); …
Run Code Online (Sandbox Code Playgroud) 目前,货币选择器位于顶部,这是我的开发网站:
http://nordschleife.metaforix.net/118/118/index.php/kyocera.html
但是,我想将货币选择器切换到表格的"价格"标题下.
我试过了
echo $this->getCurrency();
Run Code Online (Sandbox Code Playgroud)
但没什么.我想我需要一些方法getCurrencyHtml()
,但似乎没有这样的方法.
或者我必须编辑布局文件,我该怎么做呢?
我似乎得到了所有素数,但一些复合数字也出现了.为什么?
p=[2,]
while len(p)<35:
next = p[-1]+1
for i in range(len(p)):
if next%p[i]==0:
next+=1
i=0
p.append(next)
print p
Run Code Online (Sandbox Code Playgroud)
这是我得到的输出:
[2,3,5,7,11,13,16,17,19,23,27,29,31,35,37,41,43,47,50,53,59,61,65,67,71 ,73,77,79,83,87,89,95,97,101,103]