php关于网页乱码问题

指定浏览器打开网页的编码格式

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

当浏览器设置了编码方式为自动选择时:打开网页的编码方式即为charset指定的gb2312。

注意:charset=gb2312要和mysql_query("set names gbk");保持一致!!

Read More

CSS之Position详解

CSS的很多其他属性大多容易理解,比如字体,文本,背景等。有些CSS书籍也会对这些简单的属性进行大张旗鼓的介绍,而偏偏忽略了对一些难缠的属性讲解,有避重就轻的嫌疑。CSS中主要难以理解的属性包括盒型结构,以及定位。正如 positioniseverything,本文将主要讲述关于position的理解,力求让您看完本文后对position有着最全面的认识。

position的四个属性值:

  • relative
  • absolute
  • fixed
  • static

Read More

js得到select下拉列表中option的value和text

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<select id="sel" onchange="javascript:getSelect();">
<option value="a">选择</option>
<option value="bdd">be</option>
<option value="c">ce</option>
<option value="d">de</option>
<option value="e">ee</option>
</select>
<script>
function getSelect() {
//得到select下拉列表中option的value
var optionValue =
document.getElementById("sel").options[document.getElementById("sel").options.selectedIndex].value;
//得到select下拉列表中option的text
var optionText =
document.getElementById("sel").options[document.getElementById("sel").options.selectedIndex].text;
}
</script>

<select id="sele" onchange="javascript:getE();">
<option value="monday">星期一</option>
<option value="tuesday">星期二</option>
<option value="wednesday">星期三</option>
<option value="thursday">星期四</option>
<option value="friday">星期五</option>
</select>
<script>
function getE() {
//我建议这里也像下面一些写,虽然这样写也可以获得数据
var optionsValue = document.getElementById("sele").value;
alert(optionsValue);
var optionsText = document.getElementById("sele").options[document.getElementById("sele").options.selectedIndex].text;
alert(optionsText);
}
</script>

phpDesigner-PHP开发利器

相信许多PHP同胞谈到PHP开发工具的时候,都会想到Zend Studio、Eclipse等开发工具,这些工具的确非常的强大强悍,但复杂的配置满屏幕的英文并不适合所有人使用。
现在我给大家推荐了个新的php开发工具phpDesigner,这款我工具我也是找了很久,发现很多朋友都在使用并且推荐使用它,本人试用一天后发现确实很爽。但是我发现它的教程非常难找,因此决定写这篇文章,希望能够帮到更多有需要的朋友。

phpDesigner界面

Read More