看看还有哪位高手会犯这两个异常?

WBOY
Release: 2016-06-13 12:42:00
Original
826 people have browsed it

看看还有谁会犯这两个错误????
第一个JS问题

<input id="bid" value="5000"><br />
<input id="reserve_price" value="750.00"><br />
<script><br />
	$$=function(id){<br />
	return document.getElementById(id);<br />
}<br />
var error='';<br />
if($$("bid").value.replace(/^\s+/,"").replace(/\s+$/,"")<$$("reserve_price").value){<br />
			error+="Your bid must be equal to or higher than the reserve price\n";<br />
		}<br />
		alert($$("bid").value.replace(/^\s+/,"").replace(/\s+$/,""));<br />
		alert($$("reserve_price").value);<br />
		alert(error);<br />
</script>
Copy after login


你们认为这写法对吗?认为对的请运行程序看看,娃哈哈。。

第二个数据库问题。
数据表名称product
id  int(4)
name  varchar(20);
price  text

有2条记录
id   name    price
1    电视机  750.00
2    空调    5000

按价格高低排序出来
写sql语句
select * from product order by price desc

认为对的请运行看看,

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template