<input type="password" maxlength="64" autocapitalization="off" id="passwd" name="passwd" value=""">
<input type="checkbox" id="show_pass" name="show_pass" onclick="pass_checked();"> function pass_checked() {
var new_pppw_input = document.createElement("input");
var ori_pppw_input = $j("#passwd").get(0);
if ($j("#show_pass").attr("checked")) {
new_pppw_input.type="text";
}
else
{
new_pppw_input.type="password";
}
new_pppw_input.id=ori_pppw_input.id;
new_pppw_input.name=ori_pppw_input.name;
new_pppw_input.value=ori_pppw_input.value;
new_pppw_input.className = ori_pppw_input.className;
new_pppw_input.maxLength = ori_pppw_input.maxLength;
ori_pppw_input.parentNode.replaceChild(new_pppw_input, ori_pppw_input);
}
Yisin 發表在 痞客邦 留言(0) 人氣(993)
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include <sys/stat.h>
int main()
{
int fdin,fdout;
struct stat statbuf;
void *src,*dst;
char *p;
int i,j;
fdin=open("test1",O_RDONLY|O_RDWR);
fdout=open("test2",O_CREAT|O_RDWR|O_TRUNC,S_IRUSR|S_IWUSR);//需設定權限的flag,如果只能寫,會產生SIGSEGV信號
Yisin 發表在 痞客邦 留言(0) 人氣(327)
//20120730 +++++Emily add for firmware upgrade #include <linux/fs.h> #include <linux/file.h> #include <linux/types.h> #include <linux/unistd.h>
Yisin 發表在 痞客邦 留言(0) 人氣(5,604)
if(test == '0')
$j('input:radio[name=macclone]')[1].checked = true;
else
$j('input:radio[name=macclone]')[0].checked = true;
取得被選取的radio的value
Yisin 發表在 痞客邦 留言(0) 人氣(1,310)
當我們需要將$("#XXXXXXX")的物件,傳給function的時候,可以在呼叫function的時候寫成
相反的,如果我們需要傳到function中的,是document.form.XXX的時候,而原本是使用jquery的寫法的時候,可以透過下列方式取得document.form
<input type="button" id="MacCloneButton" name="MacCloneButton" onclick="printval($(this));" value="123"/>
function printval(obj){
Yisin 發表在 痞客邦 留言(0) 人氣(93)

當按下blocked的時候,會先去判斷,是否有選擇,有才會繼續做處理,沒有則alert訊息,並且return false。
$j("#BlockUsers").live("click" ,function(){
if($j("input[name='unapproved_chk[]']:checked").length > 0 || $j("input[name='approved_chk[]']:checked").length > 0){
$j("#BlockUsers").attr("disabled", true);
$j("#BlockUsers").attr("class", "button_gen_disable");
Yisin 發表在 痞客邦 留言(0) 人氣(2,270)
由於希望減輕httpd server的loading,所以使用ajax 的方式來submit form的資料
一開始,本來想說要用json的格式來傳,所以下載了json2.js,不過後來發現需要重新改httpd 的cgi
所以就沒有使用json格式,不過,還是要記錄一下
1.json (http://stackoverflow.com/questions/1255948/post-data-in-json-format-with-javascript)
Yisin 發表在 痞客邦 留言(1) 人氣(14,094)

需要製作如下效果的submenu,可以只單純透過CSS語法來完成,另一種就是背景是用圖片 但最後,還是用圖片了,原因是因為在css的圓角只能在ie9才能看的出效果,因為只有ie9才有support css3 http://blog.mukispace.com/css-border-radius/ ie6, ie7, ie8 會變成長方型
Yisin 發表在 痞客邦 留言(0) 人氣(349)

使用一段時間後,發現vdi檔不斷的增大,連想複製出來用,都很困難 不斷的刪除VirtualBox中的檔案,也沒辦法減少,上網查詢後,才找到 下列的網頁可以用來減少Vdi的大小。 http://senkao.pixnet.net/blog/post/40470349-%E7%82%BAvirtualbox%E7%9A%84vdi%E6%AA%94%E6%B8%9B%E5%B0%91%E7%A9%BA%E9%96%93 執行之前的vdi檔大小已經高達59.8G囉!
Yisin 發表在 痞客邦 留言(0) 人氣(1,162)

話說,大概一年半以前,做了Vizio Router的GUI,那時候學習了如何用DIV, CSS, Jquery以及Ajax去實現 但終究不是天天在寫網頁,才過沒多久,只是想把雜亂的Table換成Div去切畫面,都快忘了,這次一定要先記下來 原本看到的Code都是用Table去刻,但實在太雜亂了,所以想改成Div 受限於圖片的切割,所以主要需要的框架如下。但是當我依照"看"起來所需要的刻好之後
Yisin 發表在 痞客邦 留言(0) 人氣(152)