今天在英文版的开发环境下,JS提示如果出现如果有中文,则中文一直是乱码,
弄了好半天才改好,在此记录一下:
在<script>上加上 “charset="GBK"”
如下所示:
<script src="JS/LoginCheck1.js" type="text/javascript" charset="GBK" language="javascript"></script>
挺好用的,希望能对其它人有所帮助! ......
以下是关键特性
Unlimited number of levels
Can be used with or without frames
Remembers the state of the tree between pages ()
Possible to have as many trees as you like on a page
All major browsers suported
Internet Explorer 5+
Netscape 6+
Opera 7+
Mozilla
Generates XHTML 1.0 strict validated output
Alternative images for each node
演示地址:http://destroydrop.com/javascripts/tree/
下载地址:http://destroydrop.com/javascripts/tree/dtree.zip ......
当函数调用如 var = add(1,2),此时函数的指针会指向全局函数
var add = function(a,b){
return a + b;
};
var myObject = {
value:3,
getValue:function(){
return this.value;
}
};
myObject.double = function(){
var that = this;
var helper = function (){
//add方法内地this指向window对象,应该算是javascript设计错误
//所以这里用一个局部变量指向内部方法参数
that.value = add(that.value,that.value);
};
helper();
};
myObject.double();
document.writeln(myObject.getValue()); ......
源代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>simple</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
</head>
<style>
div{font-family:宋体;font-size:12px}
#sele{
margin:0 auto;
background-color:#ababab;
width:300px;
height:30px;
padding-top:10px;
}
#title{
margin:0 auto;
width:300px;
height:30px;
}
#tb{
margin:0 auto;
width:300px;
height:150px;
background-color:#aabb00
}
</style>
<body>
<div id="message" style="width:250px;height:150px;position:absolute;background-color:#fffffa;z-index:10;top:50px;left:300px;display:none">
您要记录的事情:
<textarea id="stort" cols="30" rows="7">
</textarea>
<input type="button" value="保存" id="saveButton" onclick="calendar.saveMessage()"& ......
/// <summary>
/// 返回分页SQL语句
/// </summary>
/// <param name="selectSql">查询SQL语句</param>
/// <param name="PageIndex">当前页码</param>
/// <param name="PageSize">一页多少条记录</param>
/// <returns></returns>
public static string getPageSplitSQL(string selectSql, int PageIndex, int PageSize)
{
string StartSelectSql = @" select * from (select aa.*, rownum r from (";
int CurrentReadRows = PageIndex * PageSize;
&n ......
/// <summary>
/// 返回分页SQL语句
/// </summary>
/// <param name="selectSql">查询SQL语句</param>
/// <param name="PageIndex">当前页码</param>
/// <param name="PageSize">一页多少条记录</param>
/// <returns></returns>
public static string getPageSplitSQL(string selectSql, int PageIndex, int PageSize)
{
string StartSelectSql = @" select * from (select aa.*, rownum r from (";
int CurrentReadRows = PageIndex * PageSize;
&n ......
随机拿几个食品,食品的总和等于某个价格
create table test1234 ( id number);
insert into test1234 values(10);
insert into test1234 values(20);
insert into test1234 values(30);
insert into test1234 values(40);
insert into test1234 values(50);
create or replace procedure fun_id(v in number, v_ex_id in number)
is
v_flag number := 0;
v_id number := 0;
v_rest number := 0;
begin
select count(1) into v_flag from test1234 where id = v;
if v_flag > 0 then
select id into v_id from test1234 where id = v;
dbms_output.put_line(v_id);
else
select count(1) into v_flag from test1234 where id < v and id not in (v_ex_id);
if v_flag > 0 then
select id into v_id from
&nb ......